Inversed slider and wrapper for datepicker control on PalmOS. WinHandle instead of HWND as WXWidget type. Cleaning from wxMSW specific API. Moving controls support. Non deprecated API in new port. Refreshing of whole and portions of windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -200,6 +200,7 @@ SOURCES = ../../samples/minimal/minimal.cpp \
|
|||||||
../../src/palmos/control.cpp \
|
../../src/palmos/control.cpp \
|
||||||
../../src/palmos/cursor.cpp \
|
../../src/palmos/cursor.cpp \
|
||||||
../../src/palmos/data.cpp \
|
../../src/palmos/data.cpp \
|
||||||
|
../../src/palmos/datectrl.cpp \
|
||||||
../../src/palmos/dc.cpp \
|
../../src/palmos/dc.cpp \
|
||||||
../../src/palmos/dcclient.cpp \
|
../../src/palmos/dcclient.cpp \
|
||||||
../../src/palmos/dcmemory.cpp \
|
../../src/palmos/dcmemory.cpp \
|
||||||
|
@@ -9,9 +9,9 @@ the destructor before the window itself is deleted which means that you don't
|
|||||||
have to worry about deleting them manually. Please see the \helpref{window
|
have to worry about deleting them manually. Please see the \helpref{window
|
||||||
deletion overview}{windowdeletionoverview} for more information.
|
deletion overview}{windowdeletionoverview} for more information.
|
||||||
|
|
||||||
Also note that in this, and many others, wxWidgets classes some
|
Also note that in this, and many others, wxWidgets classes some
|
||||||
\texttt{GetXXX()} methods may be overloaded (as, for example,
|
\texttt{GetXXX()} methods may be overloaded (as, for example,
|
||||||
\helpref{GetSize}{wxwindowgetsize} or
|
\helpref{GetSize}{wxwindowgetsize} or
|
||||||
\helpref{GetClientSize}{wxwindowgetclientsize}). In this case, the overloads
|
\helpref{GetClientSize}{wxwindowgetclientsize}). In this case, the overloads
|
||||||
are non-virtual because having multiple virtual functions with the same name
|
are non-virtual because having multiple virtual functions with the same name
|
||||||
results in a virtual function name hiding at the derived class level (in
|
results in a virtual function name hiding at the derived class level (in
|
||||||
@@ -353,7 +353,7 @@ implementation of wxDialog::OnCloseWindow does not necessarily delete the
|
|||||||
dialog, since it will simply simulate an wxID\_CANCEL event which is handled by
|
dialog, since it will simply simulate an wxID\_CANCEL event which is handled by
|
||||||
the appropriate button event handler and may do anything at all.
|
the appropriate button event handler and may do anything at all.
|
||||||
|
|
||||||
To guarantee that the window will be destroyed, call
|
To guarantee that the window will be destroyed, call
|
||||||
\helpref{wxWindow::Destroy}{wxwindowdestroy} instead
|
\helpref{wxWindow::Destroy}{wxwindowdestroy} instead
|
||||||
|
|
||||||
\wxheading{See also}
|
\wxheading{See also}
|
||||||
@@ -491,7 +491,7 @@ same size as it would have after a call to \helpref{Fit()}{wxwindowfit}.
|
|||||||
\func{virtual void}{DoUpdateWindowUI}{\param{wxUpdateUIEvent\&}{ event}}
|
\func{virtual void}{DoUpdateWindowUI}{\param{wxUpdateUIEvent\&}{ event}}
|
||||||
|
|
||||||
Does the window-specific updating after processing the update event.
|
Does the window-specific updating after processing the update event.
|
||||||
This function is called by \helpref{wxWindow::UpdateWindowUI}{wxwindowupdatewindowui}
|
This function is called by \helpref{wxWindow::UpdateWindowUI}{wxwindowupdatewindowui}
|
||||||
in order to check return values in the \helpref{wxUpdateUIEvent}{wxupdateuievent} and
|
in order to check return values in the \helpref{wxUpdateUIEvent}{wxupdateuievent} and
|
||||||
act appropriately. For example, to allow frame and dialog title updating, wxWidgets
|
act appropriately. For example, to allow frame and dialog title updating, wxWidgets
|
||||||
implements this function as follows:
|
implements this function as follows:
|
||||||
@@ -502,7 +502,7 @@ void wxTopLevelWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
|
|||||||
{
|
{
|
||||||
if ( event.GetSetEnabled() )
|
if ( event.GetSetEnabled() )
|
||||||
Enable(event.GetEnabled());
|
Enable(event.GetEnabled());
|
||||||
|
|
||||||
if ( event.GetSetText() )
|
if ( event.GetSetText() )
|
||||||
{
|
{
|
||||||
if ( event.GetText() != GetTitle() )
|
if ( event.GetText() != GetTitle() )
|
||||||
@@ -611,7 +611,7 @@ If {\it parent} is NULL, the search will start from all top-level
|
|||||||
frames and dialog boxes; if non-NULL, the search will be limited to the given window hierarchy.
|
frames and dialog boxes; if non-NULL, the search will be limited to the given window hierarchy.
|
||||||
The search is recursive in both cases.
|
The search is recursive in both cases.
|
||||||
|
|
||||||
If no window with such name is found,
|
If no window with such name is found,
|
||||||
\helpref{FindWindowByLabel}{wxwindowfindwindowbylabel} is called.
|
\helpref{FindWindowByLabel}{wxwindowfindwindowbylabel} is called.
|
||||||
|
|
||||||
\wxheading{See also}
|
\wxheading{See also}
|
||||||
@@ -774,9 +774,9 @@ Returns the currently captured window.
|
|||||||
|
|
||||||
\wxheading{See also}
|
\wxheading{See also}
|
||||||
|
|
||||||
\helpref{wxWindow::HasCapture}{wxwindowhascapture},
|
\helpref{wxWindow::HasCapture}{wxwindowhascapture},
|
||||||
\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse},
|
\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse},
|
||||||
\helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse},
|
\helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse},
|
||||||
\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}
|
\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}
|
||||||
|
|
||||||
|
|
||||||
@@ -813,7 +813,7 @@ system, especially if it uses themes.
|
|||||||
|
|
||||||
The \arg{variant} parameter is only relevant under Mac currently and is
|
The \arg{variant} parameter is only relevant under Mac currently and is
|
||||||
ignore under other platforms. Under Mac, it will change the size of the
|
ignore under other platforms. Under Mac, it will change the size of the
|
||||||
returned font. See \helpref{wxWindow::SetWindowVariant}{wxwindowsetwindowvariant}
|
returned font. See \helpref{wxWindow::SetWindowVariant}{wxwindowsetwindowvariant}
|
||||||
for more about this.
|
for more about this.
|
||||||
|
|
||||||
This static method is ``overridden'' in many derived classes and so calling,
|
This static method is ``overridden'' in many derived classes and so calling,
|
||||||
@@ -821,7 +821,7 @@ for example, \helpref{wxButton}{wxbutton}::GetClassDefaultAttributes() will typi
|
|||||||
return the values appropriate for a button which will be normally different
|
return the values appropriate for a button which will be normally different
|
||||||
from those returned by, say, \helpref{wxListCtrl}{wxlistctrl}::GetClassDefaultAttributes().
|
from those returned by, say, \helpref{wxListCtrl}{wxlistctrl}::GetClassDefaultAttributes().
|
||||||
|
|
||||||
The \texttt{wxVisualAttributes} structure has at least the fields
|
The \texttt{wxVisualAttributes} structure has at least the fields
|
||||||
\texttt{font}, \texttt{colFg} and \texttt{colBg}. All of them may be invalid
|
\texttt{font}, \texttt{colFg} and \texttt{colBg}. All of them may be invalid
|
||||||
if it was not possible to determine the default control appearance or,
|
if it was not possible to determine the default control appearance or,
|
||||||
especially for the background colour, if the field doesn't make sense as is
|
especially for the background colour, if the field doesn't make sense as is
|
||||||
@@ -896,7 +896,7 @@ Return the cursor associated with this window.
|
|||||||
|
|
||||||
\constfunc{virtual wxVisualAttributes}{GetDefaultAttributes}{\void}
|
\constfunc{virtual wxVisualAttributes}{GetDefaultAttributes}{\void}
|
||||||
|
|
||||||
Currently this is the same as calling
|
Currently this is the same as calling
|
||||||
\helpref{GetClassDefaultAttributes}{wxwindowgetclassdefaultattributes}(\helpref{GetWindowVariant}{wxwindowgetwindowvariant}()).
|
\helpref{GetClassDefaultAttributes}{wxwindowgetclassdefaultattributes}(\helpref{GetWindowVariant}{wxwindowgetwindowvariant}()).
|
||||||
|
|
||||||
One advantage of using this function compared to the static version is that
|
One advantage of using this function compared to the static version is that
|
||||||
@@ -988,7 +988,7 @@ Returns the grandparent of a window, or NULL if there isn't one.
|
|||||||
\constfunc{void*}{GetHandle}{\void}
|
\constfunc{void*}{GetHandle}{\void}
|
||||||
|
|
||||||
Returns the platform-specific handle of the physical window. Cast it to an appropriate
|
Returns the platform-specific handle of the physical window. Cast it to an appropriate
|
||||||
handle, such as {\bf HWND} for Windows, {\bf Widget} for Motif or {\bf GtkWidget} for GTK.
|
handle, such as {\bf HWND} for Windows, {\bf Widget} for Motif, {\bf GtkWidget} for GTK or {\bf WinHandle} for PalmOS.
|
||||||
|
|
||||||
\pythonnote{This method will return an integer in wxPython.}
|
\pythonnote{This method will return an integer in wxPython.}
|
||||||
|
|
||||||
@@ -1308,7 +1308,7 @@ method. {\bf GetWindowStyle()} is another name for the same function.
|
|||||||
|
|
||||||
\constfunc{wxWindowVariant}{GetWindowVariant}{\void}
|
\constfunc{wxWindowVariant}{GetWindowVariant}{\void}
|
||||||
|
|
||||||
Returns the value previous passed to
|
Returns the value previous passed to
|
||||||
\helpref{wxWindow::SetWindowVariant}{wxwindowsetwindowvariant}.
|
\helpref{wxWindow::SetWindowVariant}{wxwindowsetwindowvariant}.
|
||||||
|
|
||||||
|
|
||||||
@@ -1320,8 +1320,8 @@ Returns {\tt true} if this window has the current mouse capture.
|
|||||||
|
|
||||||
\wxheading{See also}
|
\wxheading{See also}
|
||||||
|
|
||||||
\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse},
|
\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse},
|
||||||
\helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse},
|
\helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse},
|
||||||
\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}
|
\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}
|
||||||
|
|
||||||
|
|
||||||
@@ -1365,12 +1365,12 @@ the font and the foreground and background colours.
|
|||||||
|
|
||||||
By ``intelligently'' the following is meant: by default, all windows use their
|
By ``intelligently'' the following is meant: by default, all windows use their
|
||||||
own \helpref{default}{wxwindowgetclassdefaultattributes} attributes. However
|
own \helpref{default}{wxwindowgetclassdefaultattributes} attributes. However
|
||||||
if some of the parents attributes are explicitly (that is, using
|
if some of the parents attributes are explicitly (that is, using
|
||||||
\helpref{SetFont}{wxwindowsetfont} and not
|
\helpref{SetFont}{wxwindowsetfont} and not
|
||||||
\helpref{SetOwnFont}{wxwindowsetownfont}) changed \emph{and} if the
|
\helpref{SetOwnFont}{wxwindowsetownfont}) changed \emph{and} if the
|
||||||
corresponding attribute hadn't been explicitly set for this window itself,
|
corresponding attribute hadn't been explicitly set for this window itself,
|
||||||
then this window takes the same value as used by the parent. In addition, if
|
then this window takes the same value as used by the parent. In addition, if
|
||||||
the window overrides \helpref{ShouldInheritColours}{wxwindowshouldinheritcolours}
|
the window overrides \helpref{ShouldInheritColours}{wxwindowshouldinheritcolours}
|
||||||
to return \false, the colours will not be changed no matter what and only the
|
to return \false, the colours will not be changed no matter what and only the
|
||||||
font might.
|
font might.
|
||||||
|
|
||||||
@@ -1549,7 +1549,7 @@ Moves this window in the tab navigation order after the specified \arg{win}.
|
|||||||
This means that when the user presses \texttt{TAB} key on that other window,
|
This means that when the user presses \texttt{TAB} key on that other window,
|
||||||
the focus switches to this window.
|
the focus switches to this window.
|
||||||
|
|
||||||
Default tab order is the same as creation order, this function and
|
Default tab order is the same as creation order, this function and
|
||||||
\helpref{MoveBeforeInTabOrder()}{wxwindowmovebeforeintaborder} allow to change
|
\helpref{MoveBeforeInTabOrder()}{wxwindowmovebeforeintaborder} allow to change
|
||||||
it after creating all the windows.
|
it after creating all the windows.
|
||||||
|
|
||||||
@@ -2089,7 +2089,7 @@ that should not be disabled by an application defining an OnIdle
|
|||||||
handler in a derived class.
|
handler in a derived class.
|
||||||
|
|
||||||
This function may be used to do delayed painting, for example,
|
This function may be used to do delayed painting, for example,
|
||||||
and most implementations call \helpref{wxWindow::UpdateWindowUI}{wxwindowupdatewindowui}
|
and most implementations call \helpref{wxWindow::UpdateWindowUI}{wxwindowupdatewindowui}
|
||||||
in order to send update events to the window in idle time.
|
in order to send update events to the window in idle time.
|
||||||
|
|
||||||
|
|
||||||
@@ -2237,7 +2237,7 @@ Redraws the contents of the given rectangle: only the area inside it will be
|
|||||||
repainted.
|
repainted.
|
||||||
|
|
||||||
This is the same as \helpref{Refresh}{wxwindowrefresh} but has a nicer syntax
|
This is the same as \helpref{Refresh}{wxwindowrefresh} but has a nicer syntax
|
||||||
as it can be called with a temporary wxRect object as argument like this
|
as it can be called with a temporary wxRect object as argument like this
|
||||||
\texttt{RefreshRect(wxRect(x, y, w, h))}.
|
\texttt{RefreshRect(wxRect(x, y, w, h))}.
|
||||||
|
|
||||||
|
|
||||||
@@ -2283,9 +2283,9 @@ Releases mouse input captured with \helpref{wxWindow::CaptureMouse}{wxwindowcapt
|
|||||||
|
|
||||||
\wxheading{See also}
|
\wxheading{See also}
|
||||||
|
|
||||||
\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse},
|
\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse},
|
||||||
\helpref{wxWindow::HasCapture}{wxwindowhascapture},
|
\helpref{wxWindow::HasCapture}{wxwindowhascapture},
|
||||||
\helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse},
|
\helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse},
|
||||||
\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}
|
\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}
|
||||||
|
|
||||||
|
|
||||||
@@ -2456,8 +2456,8 @@ See also \helpref{wxAccessible}{wxaccessible}.
|
|||||||
\func{void}{SetAutoLayout}{\param{bool}{ autoLayout}}
|
\func{void}{SetAutoLayout}{\param{bool}{ autoLayout}}
|
||||||
|
|
||||||
Determines whether the \helpref{wxWindow::Layout}{wxwindowlayout} function will
|
Determines whether the \helpref{wxWindow::Layout}{wxwindowlayout} function will
|
||||||
be called automatically when the window is resized. It is called implicitly by
|
be called automatically when the window is resized. It is called implicitly by
|
||||||
\helpref{wxWindow::SetSizer}{wxwindowsetsizer} but if you use
|
\helpref{wxWindow::SetSizer}{wxwindowsetsizer} but if you use
|
||||||
\helpref{wxWindow::SetConstraints}{wxwindowsetconstraints} you should call it
|
\helpref{wxWindow::SetConstraints}{wxwindowsetconstraints} you should call it
|
||||||
manually or otherwise the window layout won't be correctly updated when its
|
manually or otherwise the window layout won't be correctly updated when its
|
||||||
size changes.
|
size changes.
|
||||||
@@ -2479,7 +2479,7 @@ from within wxWindow::OnSize functions.}
|
|||||||
Sets the background colour of the window.
|
Sets the background colour of the window.
|
||||||
|
|
||||||
Please see \helpref{InheritAttributes}{wxwindowinheritattributes} for
|
Please see \helpref{InheritAttributes}{wxwindowinheritattributes} for
|
||||||
explanation of the difference between this method and
|
explanation of the difference between this method and
|
||||||
\helpref{SetOwnBackgroundColour}{wxwindowsetownbackgroundcolour}.
|
\helpref{SetOwnBackgroundColour}{wxwindowsetownbackgroundcolour}.
|
||||||
|
|
||||||
\wxheading{Parameters}
|
\wxheading{Parameters}
|
||||||
@@ -2832,7 +2832,7 @@ explanations.
|
|||||||
Sets the foreground colour of the window.
|
Sets the foreground colour of the window.
|
||||||
|
|
||||||
Please see \helpref{InheritAttributes}{wxwindowinheritattributes} for
|
Please see \helpref{InheritAttributes}{wxwindowinheritattributes} for
|
||||||
explanation of the difference between this method and
|
explanation of the difference between this method and
|
||||||
\helpref{SetOwnForegroundColour}{wxwindowsetownforegroundcolour}.
|
\helpref{SetOwnForegroundColour}{wxwindowsetownforegroundcolour}.
|
||||||
|
|
||||||
\wxheading{Parameters}
|
\wxheading{Parameters}
|
||||||
@@ -3201,7 +3201,7 @@ will then own the object, and will take care of its deletion.
|
|||||||
If an existing layout constraints object is already owned by the
|
If an existing layout constraints object is already owned by the
|
||||||
window, it will be deleted if the deleteOld parameter is true.
|
window, it will be deleted if the deleteOld parameter is true.
|
||||||
|
|
||||||
Note that this function will also call
|
Note that this function will also call
|
||||||
\helpref{SetAutoLayout}{wxwindowsetautolayout} implicitly with {\tt true}
|
\helpref{SetAutoLayout}{wxwindowsetautolayout} implicitly with {\tt true}
|
||||||
parameter if the {\it sizer}\/ is non-NULL and {\tt false} otherwise.
|
parameter if the {\it sizer}\/ is non-NULL and {\tt false} otherwise.
|
||||||
|
|
||||||
@@ -3295,7 +3295,7 @@ Sets the virtual size of the window in pixels.
|
|||||||
|
|
||||||
\func{virtual void}{SetVirtualSizeHints}{\param{int}{ minW},\param{int}{ minH}, \param{int}{ maxW=-1}, \param{int}{ maxH=-1}}
|
\func{virtual void}{SetVirtualSizeHints}{\param{int}{ minW},\param{int}{ minH}, \param{int}{ maxW=-1}, \param{int}{ maxH=-1}}
|
||||||
|
|
||||||
\func{void}{SetVirtualSizeHints}{\param{const wxSize\&}{ minSize=wxDefaultSize},
|
\func{void}{SetVirtualSizeHints}{\param{const wxSize\&}{ minSize=wxDefaultSize},
|
||||||
\param{const wxSize\&}{ maxSize=wxDefaultSize}}
|
\param{const wxSize\&}{ maxSize=wxDefaultSize}}
|
||||||
|
|
||||||
|
|
||||||
@@ -3371,11 +3371,11 @@ be used to change this.
|
|||||||
|
|
||||||
\func{virtual bool}{ShouldInheritColours}{\void}
|
\func{virtual bool}{ShouldInheritColours}{\void}
|
||||||
|
|
||||||
Return \true from here to allow the colours of this window to be changed by
|
Return \true from here to allow the colours of this window to be changed by
|
||||||
\helpref{InheritAttributes}{wxwindowinheritattributes}, returning \false
|
\helpref{InheritAttributes}{wxwindowinheritattributes}, returning \false
|
||||||
forbids inheriting them from the parent window.
|
forbids inheriting them from the parent window.
|
||||||
|
|
||||||
The base class version returns \false, but this method is overridden in
|
The base class version returns \false, but this method is overridden in
|
||||||
\helpref{wxControl}{wxcontrol} where it returns \true.
|
\helpref{wxControl}{wxcontrol} where it returns \true.
|
||||||
|
|
||||||
|
|
||||||
@@ -3406,7 +3406,7 @@ done because it already was in the requested state.
|
|||||||
|
|
||||||
\func{virtual void}{Thaw}{\void}
|
\func{virtual void}{Thaw}{\void}
|
||||||
|
|
||||||
Reenables window updating after a previous call to
|
Reenables window updating after a previous call to
|
||||||
\helpref{Freeze}{wxwindowfreeze}. To really thaw the control, it must be called
|
\helpref{Freeze}{wxwindowfreeze}. To really thaw the control, it must be called
|
||||||
exactly the same number of times as \helpref{Freeze}{wxwindowfreeze}.
|
exactly the same number of times as \helpref{Freeze}{wxwindowfreeze}.
|
||||||
|
|
||||||
@@ -3476,7 +3476,7 @@ This function is currently only implemented under MSW.
|
|||||||
Calling this method immediately repaints the invalidated area of the window
|
Calling this method immediately repaints the invalidated area of the window
|
||||||
while this would usually only happen when the flow of control returns to the
|
while this would usually only happen when the flow of control returns to the
|
||||||
event loop. Notice that this function doesn't refresh the window and does
|
event loop. Notice that this function doesn't refresh the window and does
|
||||||
nothing if the window hadn't been already repainted. Use
|
nothing if the window hadn't been already repainted. Use
|
||||||
\helpref{Refresh}{wxwindowrefresh} first if you want to immediately redraw the
|
\helpref{Refresh}{wxwindowrefresh} first if you want to immediately redraw the
|
||||||
window unconditionally.
|
window unconditionally.
|
||||||
|
|
||||||
@@ -3491,8 +3491,8 @@ example a wxToolBar will send an update UI event for each toolbar button,
|
|||||||
and a wxFrame will send an update UI event for each menubar menu item.
|
and a wxFrame will send an update UI event for each menubar menu item.
|
||||||
You can call this function from your application to ensure that your
|
You can call this function from your application to ensure that your
|
||||||
UI is up-to-date at this point (as far as your wxUpdateUIEvent handlers
|
UI is up-to-date at this point (as far as your wxUpdateUIEvent handlers
|
||||||
are concerned). This may be necessary if you have called
|
are concerned). This may be necessary if you have called
|
||||||
\helpref{wxUpdateUIEvent::SetMode}{wxupdateuieventsetmode} or
|
\helpref{wxUpdateUIEvent::SetMode}{wxupdateuieventsetmode} or
|
||||||
\helpref{wxUpdateUIEvent::SetUpdateInterval}{wxupdateuieventsetupdateinterval} to
|
\helpref{wxUpdateUIEvent::SetUpdateInterval}{wxupdateuieventsetupdateinterval} to
|
||||||
limit the overhead that wxWidgets incurs by sending update UI events in idle time.
|
limit the overhead that wxWidgets incurs by sending update UI events in idle time.
|
||||||
|
|
||||||
@@ -3525,8 +3525,8 @@ void MyWindow::OnInternalIdle()
|
|||||||
|
|
||||||
\wxheading{See also}
|
\wxheading{See also}
|
||||||
|
|
||||||
\helpref{wxUpdateUIEvent}{wxupdateuievent},
|
\helpref{wxUpdateUIEvent}{wxupdateuievent},
|
||||||
\helpref{wxWindow::DoUpdateWindowUI}{wxwindowdoupdatewindowui},
|
\helpref{wxWindow::DoUpdateWindowUI}{wxwindowdoupdatewindowui},
|
||||||
\helpref{wxWindow::OnInternalIdle}{wxwindowoninternalidle}
|
\helpref{wxWindow::OnInternalIdle}{wxwindowoninternalidle}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1262,6 +1262,17 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif /* wxUSE_CALENDARCTRL */
|
#endif /* wxUSE_CALENDARCTRL */
|
||||||
|
|
||||||
|
#if wxUSE_DATEPICKCTRL
|
||||||
|
# if !wxUSE_DATETIME
|
||||||
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
|
# error wxDatePickerCtrl requires wxUSE_DATETIME"
|
||||||
|
# else
|
||||||
|
# undef wxUSE_DATETIME
|
||||||
|
# define wxUSE_DATETIME 1
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif /* wxUSE_DATEPICKCTRL */
|
||||||
|
|
||||||
#if wxUSE_CHECKLISTBOX
|
#if wxUSE_CHECKLISTBOX
|
||||||
# if !wxUSE_LISTBOX
|
# if !wxUSE_LISTBOX
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
|
@@ -74,7 +74,11 @@ public:
|
|||||||
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const = 0;
|
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
|
#if defined(__WXPALMOS__)
|
||||||
|
#include "wx/palmos/datectrl.h"
|
||||||
|
|
||||||
|
#define wxHAS_NATIVE_DATEPICKCTRL
|
||||||
|
#elif defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
|
||||||
#include "wx/msw/datectrl.h"
|
#include "wx/msw/datectrl.h"
|
||||||
|
|
||||||
#define wxHAS_NATIVE_DATEPICKCTRL
|
#define wxHAS_NATIVE_DATEPICKCTRL
|
||||||
|
@@ -2346,7 +2346,37 @@ DECLARE_WXCOCOA_OBJC_CLASS(NSView);
|
|||||||
typedef WX_NSView WXWidget; /* wxWidgets BASE definition */
|
typedef WX_NSView WXWidget; /* wxWidgets BASE definition */
|
||||||
#endif /* __WXCOCOA__ */
|
#endif /* __WXCOCOA__ */
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXPALMOS__)
|
#if defined(__WXPALMOS__)
|
||||||
|
|
||||||
|
typedef void * WXHANDLE;
|
||||||
|
typedef void * WXHICON;
|
||||||
|
typedef void * WXHFONT;
|
||||||
|
typedef void * WXHMENU;
|
||||||
|
typedef void * WXHPEN;
|
||||||
|
typedef void * WXHBRUSH;
|
||||||
|
typedef void * WXHPALETTE;
|
||||||
|
typedef void * WXHCURSOR;
|
||||||
|
typedef void * WXHRGN;
|
||||||
|
typedef void * WXHACCEL;
|
||||||
|
typedef void * WXHINSTANCE;
|
||||||
|
typedef void * WXHBITMAP;
|
||||||
|
typedef void * WXHIMAGELIST;
|
||||||
|
typedef void * WXHGLOBAL;
|
||||||
|
typedef void * WXHDC;
|
||||||
|
typedef unsigned int WXUINT;
|
||||||
|
typedef unsigned long WXDWORD;
|
||||||
|
typedef unsigned short WXWORD;
|
||||||
|
|
||||||
|
typedef unsigned long WXCOLORREF;
|
||||||
|
typedef struct tagMSG WXMSG;
|
||||||
|
|
||||||
|
typedef WinHandle WXWINHANDLE;
|
||||||
|
typedef WXWINHANDLE WXWidget;
|
||||||
|
|
||||||
|
#endif /* __WXPALMOS__ */
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__WXMSW__)
|
||||||
|
|
||||||
/* the keywords needed for WinMain() declaration */
|
/* the keywords needed for WinMain() declaration */
|
||||||
#ifndef WXFAR
|
#ifndef WXFAR
|
||||||
|
@@ -84,8 +84,6 @@ public:
|
|||||||
// MSW only
|
// MSW only
|
||||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||||
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||||
|
@@ -108,9 +108,6 @@ public:
|
|||||||
bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
|
bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
WXHWND GetEditHWND() const;
|
WXHWND GetEditHWND() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -72,9 +72,6 @@ public:
|
|||||||
|
|
||||||
void OnEraseBackground(wxEraseEvent& event);
|
void OnEraseBackground(wxEraseEvent& event);
|
||||||
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// regardless how deeply we are in wxWidgets hierarchy always get correct form
|
// regardless how deeply we are in wxWidgets hierarchy always get correct form
|
||||||
FormType* GetParentForm() const;
|
FormType* GetParentForm() const;
|
||||||
@@ -101,6 +98,7 @@ protected:
|
|||||||
// getting and setting sizes
|
// getting and setting sizes
|
||||||
virtual void DoGetPosition( int *x, int *y ) const;
|
virtual void DoGetPosition( int *x, int *y ) const;
|
||||||
virtual void DoGetSize( int *width, int *height ) const;
|
virtual void DoGetSize( int *width, int *height ) const;
|
||||||
|
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||||
|
|
||||||
// create the control of the given ControlStyleType: this is typically called
|
// create the control of the given ControlStyleType: this is typically called
|
||||||
// from Create() method of the derived class passing its label, pos and
|
// from Create() method of the derived class passing its label, pos and
|
||||||
@@ -143,6 +141,7 @@ private:
|
|||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
virtual void DoGetBounds( RectangleType &rect ) const;
|
virtual void DoGetBounds( RectangleType &rect ) const;
|
||||||
|
virtual void DoSetBounds( RectangleType &rect );
|
||||||
|
|
||||||
// m_label stores label in case of wxButton, wxCheckBox, wxToggleButton etc.
|
// m_label stores label in case of wxButton, wxCheckBox, wxToggleButton etc.
|
||||||
// We must ensure that it persists for as long as it is being displayed
|
// We must ensure that it persists for as long as it is being displayed
|
||||||
|
62
include/wx/palmos/datectrl.h
Normal file
62
include/wx/palmos/datectrl.h
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: wx/palmos/datectrl.h
|
||||||
|
// Purpose: wxDatePickerCtrl for PalmOS
|
||||||
|
// Author: Wlodzimierz ABX Skiba
|
||||||
|
// Modified by:
|
||||||
|
// Created: 02/15/05
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Wlodzimierz Skiba
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef _WX_PALMOS_DATECTRL_H_
|
||||||
|
#define _WX_PALMOS_DATECTRL_H_
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxDatePickerCtrl
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class WXDLLIMPEXP_ADV wxDatePickerCtrl : public wxDatePickerCtrlBase
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// ctors
|
||||||
|
wxDatePickerCtrl() { }
|
||||||
|
|
||||||
|
wxDatePickerCtrl(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxDateTime& dt = wxDefaultDateTime,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
|
||||||
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
|
const wxString& name = wxDatePickerCtrlNameStr)
|
||||||
|
{
|
||||||
|
Create(parent, id, dt, pos, size, style, validator, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Create(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxDateTime& dt = wxDefaultDateTime,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
|
||||||
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
|
const wxString& name = wxDatePickerCtrlNameStr);
|
||||||
|
|
||||||
|
// set/get the date
|
||||||
|
virtual void SetValue(const wxDateTime& dt);
|
||||||
|
virtual wxDateTime GetValue() const;
|
||||||
|
|
||||||
|
// set/get the allowed valid range for the dates, if either/both of them
|
||||||
|
// are invalid, there is no corresponding limit and if neither is set
|
||||||
|
// GetRange() returns false
|
||||||
|
virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2);
|
||||||
|
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
|
DECLARE_NO_COPY_CLASS(wxDatePickerCtrl)
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _WX_PALMOS_DATECTRL_H_
|
@@ -63,7 +63,7 @@ public:
|
|||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
// override some base class virtuals
|
// override some base class virtuals
|
||||||
virtual bool Show(bool show = TRUE);
|
virtual bool Show(bool show = true);
|
||||||
|
|
||||||
virtual void Raise();
|
virtual void Raise();
|
||||||
|
|
||||||
@@ -76,28 +76,6 @@ public:
|
|||||||
void OnApply(wxCommandEvent& event);
|
void OnApply(wxCommandEvent& event);
|
||||||
void OnCancel(wxCommandEvent& event);
|
void OnCancel(wxCommandEvent& event);
|
||||||
|
|
||||||
// Responds to colour changes
|
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
||||||
|
|
||||||
// Windows callbacks
|
|
||||||
WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
// obsolete methods
|
|
||||||
// ----------------
|
|
||||||
|
|
||||||
// use the other ctor
|
|
||||||
wxDEPRECATED( wxDialog(wxWindow *parent,
|
|
||||||
const wxString& title, bool modal,
|
|
||||||
int x = -1, int y= -1, int width = 500, int height = 500,
|
|
||||||
long style = wxDEFAULT_DIALOG_STYLE,
|
|
||||||
const wxString& name = wxDialogNameStr) );
|
|
||||||
|
|
||||||
// just call Show() or ShowModal()
|
|
||||||
wxDEPRECATED( void SetModal(bool flag) );
|
|
||||||
|
|
||||||
// use IsModal()
|
|
||||||
wxDEPRECATED( bool IsModalShowing() const );
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// find the window to use as parent for this dialog if none has been
|
// find the window to use as parent for this dialog if none has been
|
||||||
// specified explicitly by the user
|
// specified explicitly by the user
|
||||||
|
@@ -52,7 +52,6 @@ public:
|
|||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
// event handlers
|
// event handlers
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
||||||
void OnPaint(wxPaintEvent& event);
|
void OnPaint(wxPaintEvent& event);
|
||||||
|
|
||||||
// Toolbar
|
// Toolbar
|
||||||
@@ -65,8 +64,6 @@ public:
|
|||||||
#endif // wxUSE_TOOLBAR
|
#endif // wxUSE_TOOLBAR
|
||||||
|
|
||||||
// event handlers
|
// event handlers
|
||||||
bool HandlePaint();
|
|
||||||
bool HandleSize(int x, int y, WXUINT flag);
|
|
||||||
bool HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup);
|
bool HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup);
|
||||||
|
|
||||||
virtual wxPoint GetClientAreaOrigin() const;
|
virtual wxPoint GetClientAreaOrigin() const;
|
||||||
|
@@ -213,9 +213,6 @@ public:
|
|||||||
// Add or remove a single window style
|
// Add or remove a single window style
|
||||||
void SetSingleStyle(long style, bool add = true) ;
|
void SetSingleStyle(long style, bool add = true) ;
|
||||||
|
|
||||||
// Set the whole window style
|
|
||||||
void SetWindowStyleFlag(long style) ;
|
|
||||||
|
|
||||||
// Searches for an item, starting from 'item'.
|
// Searches for an item, starting from 'item'.
|
||||||
// item can be -1 to find the first item that matches the
|
// item can be -1 to find the first item that matches the
|
||||||
// specified flags.
|
// specified flags.
|
||||||
@@ -348,10 +345,6 @@ public:
|
|||||||
static wxVisualAttributes
|
static wxVisualAttributes
|
||||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||||
|
|
||||||
|
|
||||||
// obsolete stuff, for compatibility only -- don't use
|
|
||||||
wxDEPRECATED( int GetItemSpacing(bool isSmall) const);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void Init();
|
void Init();
|
||||||
|
@@ -81,14 +81,8 @@ public:
|
|||||||
// handlers
|
// handlers
|
||||||
// --------
|
// --------
|
||||||
|
|
||||||
// Responds to colour changes
|
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
||||||
|
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
|
|
||||||
bool HandleActivate(int state, bool minimized, WXHWND activate);
|
|
||||||
bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
|
|
||||||
|
|
||||||
// override window proc for MDI-specific message processing
|
// override window proc for MDI-specific message processing
|
||||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
@@ -106,7 +100,7 @@ protected:
|
|||||||
wxMDIChildFrame * m_currentChild;
|
wxMDIChildFrame * m_currentChild;
|
||||||
wxMenu* m_windowMenu;
|
wxMenu* m_windowMenu;
|
||||||
|
|
||||||
// TRUE if MDI Frame is intercepting commands, not child
|
// true if MDI Frame is intercepting commands, not child
|
||||||
bool m_parentFrameActive;
|
bool m_parentFrameActive;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -148,10 +142,10 @@ public:
|
|||||||
long style = wxDEFAULT_FRAME_STYLE,
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
const wxString& name = wxFrameNameStr);
|
const wxString& name = wxFrameNameStr);
|
||||||
|
|
||||||
virtual bool IsTopLevel() const { return FALSE; }
|
virtual bool IsTopLevel() const { return false; }
|
||||||
|
|
||||||
// MDI operations
|
// MDI operations
|
||||||
virtual void Maximize(bool maximize = TRUE);
|
virtual void Maximize(bool maximize = true);
|
||||||
virtual void Restore();
|
virtual void Restore();
|
||||||
virtual void Activate();
|
virtual void Activate();
|
||||||
|
|
||||||
@@ -161,8 +155,6 @@ public:
|
|||||||
// Handlers
|
// Handlers
|
||||||
bool HandleMDIActivate(long bActivate, WXHWND, WXHWND);
|
bool HandleMDIActivate(long bActivate, WXHWND, WXHWND);
|
||||||
bool HandleWindowPosChanging(void *lpPos);
|
bool HandleWindowPosChanging(void *lpPos);
|
||||||
bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
|
|
||||||
bool HandleGetMinMaxInfo(void *mmInfo);
|
|
||||||
|
|
||||||
virtual WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
virtual WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
virtual WXLRESULT MSWDefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
virtual WXLRESULT MSWDefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
@@ -178,7 +170,7 @@ protected:
|
|||||||
virtual void DoGetPosition(int *x, int *y) const;
|
virtual void DoGetPosition(int *x, int *y) const;
|
||||||
virtual void DoSetClientSize(int width, int height);
|
virtual void DoSetClientSize(int width, int height);
|
||||||
virtual void InternalSetMenuBar();
|
virtual void InternalSetMenuBar();
|
||||||
virtual bool IsMDIChild() const { return TRUE; }
|
virtual bool IsMDIChild() const { return true; }
|
||||||
|
|
||||||
virtual WXHICON GetDefaultIcon() const;
|
virtual WXHICON GetDefaultIcon() const;
|
||||||
|
|
||||||
|
@@ -46,7 +46,7 @@ public:
|
|||||||
|
|
||||||
virtual void SetThumbPosition(int viewStart);
|
virtual void SetThumbPosition(int viewStart);
|
||||||
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
|
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
|
||||||
bool refresh = TRUE);
|
bool refresh = true);
|
||||||
|
|
||||||
// needed for RTTI
|
// needed for RTTI
|
||||||
void SetThumbSize( int s ) { SetScrollbar( GetThumbPosition() , s , GetRange() , GetPageSize() , true ) ; }
|
void SetThumbSize( int s ) { SetScrollbar( GetThumbPosition() , s , GetRange() , GetPageSize() , true ) ; }
|
||||||
@@ -54,8 +54,6 @@ public:
|
|||||||
void SetRange( int s ) { SetScrollbar( GetThumbPosition() , GetThumbSize() , s , GetPageSize() , true ) ; }
|
void SetRange( int s ) { SetScrollbar( GetThumbPosition() , GetThumbSize() , s , GetPageSize() , true ) ; }
|
||||||
|
|
||||||
void Command(wxCommandEvent& event);
|
void Command(wxCommandEvent& event);
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
virtual bool MSWOnScroll(int orientation, WXWORD wParam,
|
virtual bool MSWOnScroll(int orientation, WXWORD wParam,
|
||||||
WXWORD pos, WXHWND control);
|
WXWORD pos, WXHWND control);
|
||||||
|
|
||||||
|
@@ -85,6 +85,9 @@ protected:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
|
int PalmInvertOrNot(int value) const;
|
||||||
|
|
||||||
int m_oldPos; // needed for tracing thumb position during scrolling
|
int m_oldPos; // needed for tracing thumb position during scrolling
|
||||||
int m_oldValue; // needed for comparing thumb position before and after scrolling
|
int m_oldValue; // needed for comparing thumb position before and after scrolling
|
||||||
int m_lineSize; // imitate line size
|
int m_lineSize; // imitate line size
|
||||||
|
@@ -117,9 +117,6 @@ class WXDLLEXPORT wxTabCtrl: public wxControl
|
|||||||
|
|
||||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
||||||
|
|
||||||
// Responds to colour changes
|
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxImageList* m_imageList;
|
wxImageList* m_imageList;
|
||||||
|
|
||||||
|
@@ -136,12 +136,8 @@ public:
|
|||||||
// Implementation from now on
|
// Implementation from now on
|
||||||
// --------------------------
|
// --------------------------
|
||||||
|
|
||||||
virtual void SetWindowStyleFlag(long style);
|
|
||||||
|
|
||||||
virtual void Command(wxCommandEvent& event);
|
virtual void Command(wxCommandEvent& event);
|
||||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
#if wxUSE_RICHEDIT
|
#if wxUSE_RICHEDIT
|
||||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
||||||
@@ -155,8 +151,6 @@ public:
|
|||||||
virtual bool SetForegroundColour(const wxColour& colour);
|
virtual bool SetForegroundColour(const wxColour& colour);
|
||||||
#endif // wxUSE_RICHEDIT
|
#endif // wxUSE_RICHEDIT
|
||||||
|
|
||||||
virtual void AdoptAttributesFromHWND();
|
|
||||||
|
|
||||||
virtual bool AcceptsFocus() const;
|
virtual bool AcceptsFocus() const;
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
|
@@ -60,10 +60,7 @@ public:
|
|||||||
// implementation only from now on
|
// implementation only from now on
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
virtual void SetWindowStyleFlag(long style);
|
|
||||||
|
|
||||||
void OnMouseEvent(wxMouseEvent& event);
|
void OnMouseEvent(wxMouseEvent& event);
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
||||||
|
|
||||||
void SetFocus() {}
|
void SetFocus() {}
|
||||||
|
|
||||||
|
@@ -89,6 +89,8 @@ public:
|
|||||||
bool HandleControlRepeat(EventType* event);
|
bool HandleControlRepeat(EventType* event);
|
||||||
bool HandleSize(EventType* event);
|
bool HandleSize(EventType* event);
|
||||||
|
|
||||||
|
virtual WXWINHANDLE GetWinHandle() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void Init();
|
void Init();
|
||||||
@@ -102,9 +104,6 @@ protected:
|
|||||||
// translate wxWidgets flags to Windows ones
|
// translate wxWidgets flags to Windows ones
|
||||||
virtual WXDWORD PalmGetStyle(long flags, WXDWORD *exstyle) const;
|
virtual WXDWORD PalmGetStyle(long flags, WXDWORD *exstyle) const;
|
||||||
|
|
||||||
// choose the right parent to use with CreateWindow()
|
|
||||||
virtual WXHWND PalmGetParent() const;
|
|
||||||
|
|
||||||
// is the window currently iconized?
|
// is the window currently iconized?
|
||||||
bool m_iconized;
|
bool m_iconized;
|
||||||
|
|
||||||
|
@@ -74,12 +74,11 @@ public:
|
|||||||
virtual void WarpPointer(int x, int y);
|
virtual void WarpPointer(int x, int y);
|
||||||
|
|
||||||
virtual void Refresh( bool eraseBackground = true,
|
virtual void Refresh( bool eraseBackground = true,
|
||||||
const wxRect *rect = (const wxRect *) NULL );
|
const wxRect *rect = NULL );
|
||||||
virtual void Update();
|
virtual void Update();
|
||||||
virtual void Freeze();
|
virtual void Freeze();
|
||||||
virtual void Thaw();
|
virtual void Thaw();
|
||||||
|
|
||||||
virtual void SetWindowStyleFlag( long style );
|
|
||||||
virtual bool SetCursor( const wxCursor &cursor );
|
virtual bool SetCursor( const wxCursor &cursor );
|
||||||
virtual bool SetFont( const wxFont &font );
|
virtual bool SetFont( const wxFont &font );
|
||||||
|
|
||||||
@@ -136,9 +135,8 @@ public:
|
|||||||
// simple accessors
|
// simple accessors
|
||||||
// ----------------
|
// ----------------
|
||||||
|
|
||||||
WXHWND GetHWND() const { return m_hWnd; }
|
virtual WXWINHANDLE GetWinHandle() const { return m_handle; }
|
||||||
void SetHWND(WXHWND hWnd) { m_hWnd = hWnd; }
|
virtual WXWidget GetHandle() const { return GetWinHandle(); }
|
||||||
virtual WXWidget GetHandle() const { return GetHWND(); }
|
|
||||||
|
|
||||||
// event handlers
|
// event handlers
|
||||||
// --------------
|
// --------------
|
||||||
@@ -147,23 +145,11 @@ public:
|
|||||||
void OnPaint(wxPaintEvent& event);
|
void OnPaint(wxPaintEvent& event);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Windows subclassing
|
|
||||||
void SubclassWin(WXHWND hWnd);
|
|
||||||
void UnsubclassWin();
|
|
||||||
|
|
||||||
WXFARPROC PalmGetOldWndProc() const { return m_oldWndProc; }
|
|
||||||
void PalmSetOldWndProc(WXFARPROC proc) { m_oldWndProc = proc; }
|
|
||||||
|
|
||||||
// return true if the window is of a standard (i.e. not wxWidgets') class
|
|
||||||
//
|
|
||||||
// to understand why does it work, look at SubclassWin() code and comments
|
|
||||||
bool IsOfStandardClass() const { return m_oldWndProc != NULL; }
|
|
||||||
|
|
||||||
wxWindow *FindItem(long id) const;
|
wxWindow *FindItem(long id) const;
|
||||||
wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const;
|
wxWindow *FindItemByWinHandle(WXWINHANDLE handle, bool controlOnly = false) const;
|
||||||
|
|
||||||
// Palm only: true if this control is part of the main control
|
// Palm only: true if this control is part of the main control
|
||||||
virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return false; };
|
virtual bool ContainsWinHandle(WXWINHANDLE WXUNUSED(handle)) const { return false; };
|
||||||
|
|
||||||
// translate wxWidgets style flags for this control into the Windows style
|
// translate wxWidgets style flags for this control into the Windows style
|
||||||
// and optional extended style for the corresponding native control
|
// and optional extended style for the corresponding native control
|
||||||
@@ -188,9 +174,6 @@ public:
|
|||||||
int& x, int& y,
|
int& x, int& y,
|
||||||
int& w, int& h) const;
|
int& w, int& h) const;
|
||||||
|
|
||||||
// get the HWND to be used as parent of this window with CreateWindow()
|
|
||||||
virtual WXHWND PalmGetParent() const;
|
|
||||||
|
|
||||||
// creates the window of specified Windows class with given style, extended
|
// creates the window of specified Windows class with given style, extended
|
||||||
// style, title and geometry (default values
|
// style, title and geometry (default values
|
||||||
//
|
//
|
||||||
@@ -202,150 +185,25 @@ public:
|
|||||||
WXDWORD style = 0,
|
WXDWORD style = 0,
|
||||||
WXDWORD exendedStyle = 0);
|
WXDWORD exendedStyle = 0);
|
||||||
|
|
||||||
virtual bool PalmCommand(WXUINT param, WXWORD id);
|
|
||||||
|
|
||||||
#ifndef __WXUNIVERSAL__
|
#ifndef __WXUNIVERSAL__
|
||||||
// Create an appropriate wxWindow from a HWND
|
// Create an appropriate wxWindow from a WinHandle
|
||||||
virtual wxWindow* CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd);
|
virtual wxWindow* CreateWindowFromWinHandle(wxWindow* parent, WXWINHANDLE handle);
|
||||||
|
|
||||||
// Make sure the window style reflects the HWND style (roughly)
|
// Make sure the window style reflects the WinHandle style (roughly)
|
||||||
virtual void AdoptAttributesFromHWND();
|
virtual void AdoptAttributesFromWinHandle();
|
||||||
#endif // __WXUNIVERSAL__
|
#endif // __WXUNIVERSAL__
|
||||||
|
|
||||||
// Setup background and foreground colours correctly
|
// Setup background and foreground colours correctly
|
||||||
virtual void SetupColours();
|
virtual void SetupColours();
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
// helpers for message handlers: these perform the same function as the
|
|
||||||
// message crackers from <windowsx.h> - they unpack WPARAM and LPARAM into
|
|
||||||
// the correct parameters
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void UnpackCommand(WXWPARAM wParam, WXLPARAM lParam,
|
|
||||||
WXWORD *id, WXHWND *hwnd, WXWORD *cmd);
|
|
||||||
void UnpackActivate(WXWPARAM wParam, WXLPARAM lParam,
|
|
||||||
WXWORD *state, WXWORD *minimized, WXHWND *hwnd);
|
|
||||||
void UnpackScroll(WXWPARAM wParam, WXLPARAM lParam,
|
|
||||||
WXWORD *code, WXWORD *pos, WXHWND *hwnd);
|
|
||||||
void UnpackCtlColor(WXWPARAM wParam, WXLPARAM lParam,
|
|
||||||
WXWORD *nCtlColor, WXHDC *hdc, WXHWND *hwnd);
|
|
||||||
void UnpackMenuSelect(WXWPARAM wParam, WXLPARAM lParam,
|
|
||||||
WXWORD *item, WXWORD *flags, WXHMENU *hmenu);
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// internal handlers for Palm messages: all handlers return a boolean value:
|
// internal handlers for Palm messages: all handlers return a boolean value:
|
||||||
// true means that the handler processed the event and false that it didn't
|
// true means that the handler processed the event and false that it didn't
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
// there are several cases where we have virtual functions for Windows
|
|
||||||
// message processing: this is because these messages often require to be
|
|
||||||
// processed in a different manner in the derived classes. For all other
|
|
||||||
// messages, however, we do *not* have corresponding PalmOnXXX() function
|
|
||||||
// and if the derived class wants to process them, it should override
|
|
||||||
// PalmWindowProc() directly.
|
|
||||||
|
|
||||||
// scroll event (both horizontal and vertical)
|
// scroll event (both horizontal and vertical)
|
||||||
virtual bool PalmOnScroll(int orientation, WXWORD nSBCode,
|
virtual bool PalmOnScroll(int orientation, WXWORD nSBCode,
|
||||||
WXWORD pos, WXHWND control);
|
WXWORD pos, WXWINHANDLE control);
|
||||||
|
|
||||||
// owner-drawn controls need to process these messages
|
|
||||||
virtual bool PalmOnDrawItem(int id, WXDRAWITEMSTRUCT *item);
|
|
||||||
virtual bool PalmOnMeasureItem(int id, WXMEASUREITEMSTRUCT *item);
|
|
||||||
|
|
||||||
// the rest are not virtual
|
|
||||||
bool HandleCreate(WXLPCREATESTRUCT cs, bool *mayCreate);
|
|
||||||
bool HandleInitDialog(WXHWND hWndFocus);
|
|
||||||
bool HandleDestroy();
|
|
||||||
|
|
||||||
bool HandlePaint();
|
|
||||||
bool HandleEraseBkgnd(WXHDC pDC);
|
|
||||||
|
|
||||||
bool HandleMinimize();
|
|
||||||
bool HandleMaximize();
|
|
||||||
bool HandleSize(int x, int y, WXUINT flag);
|
|
||||||
bool HandleSizing(wxRect& rect);
|
|
||||||
bool HandleGetMinMaxInfo(void *mmInfo);
|
|
||||||
|
|
||||||
bool HandleShow(bool show, int status);
|
|
||||||
bool HandleActivate(int flag, bool minimized, WXHWND activate);
|
|
||||||
|
|
||||||
bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
|
|
||||||
|
|
||||||
bool HandleCtlColor(WXHBRUSH *hBrush,
|
|
||||||
WXHDC hdc,
|
|
||||||
WXHWND hWnd,
|
|
||||||
WXUINT nCtlColor,
|
|
||||||
WXUINT message,
|
|
||||||
WXWPARAM wParam,
|
|
||||||
WXLPARAM lParam);
|
|
||||||
|
|
||||||
bool HandlePaletteChanged(WXHWND hWndPalChange);
|
|
||||||
bool HandleQueryNewPalette();
|
|
||||||
bool HandleSysColorChange();
|
|
||||||
bool HandleDisplayChange();
|
|
||||||
bool HandleCaptureChanged(WXHWND gainedCapture);
|
|
||||||
|
|
||||||
bool HandleQueryEndSession(long logOff, bool *mayEnd);
|
|
||||||
bool HandleEndSession(bool endSession, long logOff);
|
|
||||||
|
|
||||||
bool HandleSetFocus(WXHWND wnd);
|
|
||||||
bool HandleKillFocus(WXHWND wnd);
|
|
||||||
|
|
||||||
bool HandleDropFiles(WXWPARAM wParam);
|
|
||||||
|
|
||||||
bool HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags);
|
|
||||||
bool HandleMouseMove(int x, int y, WXUINT flags);
|
|
||||||
bool HandleMouseWheel(WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
bool HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII = false);
|
|
||||||
bool HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
bool HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
#if wxUSE_ACCEL
|
|
||||||
bool HandleHotKey(WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool HandleQueryDragIcon(WXHICON *hIcon);
|
|
||||||
|
|
||||||
bool HandleSetCursor(WXHWND hWnd, short nHitTest, int mouseMsg);
|
|
||||||
|
|
||||||
// Window procedure
|
|
||||||
virtual WXLRESULT PalmWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
// Calls an appropriate default window procedure
|
|
||||||
virtual WXLRESULT PalmDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
// message processing helpers
|
|
||||||
|
|
||||||
// return false if the message shouldn't be translated/preprocessed but
|
|
||||||
// dispatched normally
|
|
||||||
virtual bool PalmShouldPreProcessMessage(WXMSG* pMsg);
|
|
||||||
|
|
||||||
// return true if the message was preprocessed and shouldn't be dispatched
|
|
||||||
virtual bool PalmProcessMessage(WXMSG* pMsg);
|
|
||||||
|
|
||||||
// return true if the message was translated and shouldn't be dispatched
|
|
||||||
virtual bool PalmTranslateMessage(WXMSG* pMsg);
|
|
||||||
|
|
||||||
// called when the window is about to be destroyed
|
|
||||||
virtual void PalmDestroyWindow();
|
|
||||||
|
|
||||||
// this function should return the brush to paint the window background
|
|
||||||
// with or 0 for the default brush
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC hDC,
|
|
||||||
WXHWND hWnd,
|
|
||||||
WXUINT nCtlColor,
|
|
||||||
WXUINT message,
|
|
||||||
WXWPARAM wParam,
|
|
||||||
WXLPARAM lParam);
|
|
||||||
|
|
||||||
// Responds to colour changes: passes event on to children.
|
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
||||||
|
|
||||||
// initialize various fields of wxMouseEvent (common part of PalmOnMouseXXX)
|
|
||||||
void InitMouseEvent(wxMouseEvent& event, int x, int y, WXUINT flags);
|
|
||||||
|
|
||||||
// check if mouse is in the window
|
|
||||||
bool IsMouseInWindow() const;
|
|
||||||
|
|
||||||
// virtual function for implementing internal idle
|
// virtual function for implementing internal idle
|
||||||
// behaviour
|
// behaviour
|
||||||
@@ -353,15 +211,12 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// the window handle
|
// the window handle
|
||||||
WXHWND m_hWnd;
|
WinHandle m_handle;
|
||||||
FormType *FrameForm;
|
FormType *FrameForm;
|
||||||
|
|
||||||
FormType *GetFormPtr();
|
FormType *GetFormPtr();
|
||||||
void SetFormPtr(FormType *FormPtr);
|
void SetFormPtr(FormType *FormPtr);
|
||||||
|
|
||||||
// the old window proc (we subclass all windows)
|
|
||||||
WXFARPROC m_oldWndProc;
|
|
||||||
|
|
||||||
// additional (Palm specific) flags
|
// additional (Palm specific) flags
|
||||||
bool m_mouseInWindow:1;
|
bool m_mouseInWindow:1;
|
||||||
bool m_lastKeydownProcessed:1;
|
bool m_lastKeydownProcessed:1;
|
||||||
@@ -409,10 +264,6 @@ protected:
|
|||||||
const wxString& ttip);
|
const wxString& ttip);
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
// the helper functions used by HandleChar/KeyXXX methods
|
|
||||||
wxKeyEvent CreateKeyEvent(wxEventType evType, int id,
|
|
||||||
WXLPARAM lParam = 0, WXWPARAM wParam = 0) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void Init();
|
void Init();
|
||||||
@@ -433,24 +284,6 @@ private:
|
|||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// global functions
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// kbd code translation
|
|
||||||
WXDLLEXPORT int wxCharCodePalmToWX(int keySym, WXLPARAM lParam = 0);
|
|
||||||
WXDLLEXPORT int wxCharCodeWXToPalm(int id, bool *IsVirtual);
|
|
||||||
|
|
||||||
// window creation helper class: before creating a new HWND, instantiate an
|
|
||||||
// object of this class on stack - this allows to process the messages sent to
|
|
||||||
// the window even before CreateWindow() returns
|
|
||||||
class wxWindowCreationHook
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxWindowCreationHook(wxWindowPalm *winBeingCreated);
|
|
||||||
~wxWindowCreationHook();
|
|
||||||
};
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// global objects
|
// global objects
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -459,7 +292,7 @@ public:
|
|||||||
// needs to "see" its dtor and not just forward declaration
|
// needs to "see" its dtor and not just forward declaration
|
||||||
#include "wx/hash.h"
|
#include "wx/hash.h"
|
||||||
|
|
||||||
// pseudo-template HWND <-> wxWindow hash table
|
// pseudo-template WinHandle <-> wxWindow hash table
|
||||||
WX_DECLARE_HASH(wxWindowPalm, wxWindowList, wxWinHashTable);
|
WX_DECLARE_HASH(wxWindowPalm, wxWindowList, wxWinHashTable);
|
||||||
|
|
||||||
extern wxWinHashTable *wxWinHandleHash;
|
extern wxWinHashTable *wxWinHandleHash;
|
||||||
|
@@ -120,7 +120,7 @@ bool wxChoice::CreateAndInit(wxWindow *parent,
|
|||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxChoice::Create(wxWindow *parent,
|
bool wxChoice::Create(wxWindow *parent,
|
||||||
@@ -272,13 +272,4 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHBRUSH wxChoice::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
|
||||||
WXUINT WXUNUSED(message),
|
|
||||||
WXWPARAM WXUNUSED(wParam),
|
|
||||||
WXLPARAM WXUNUSED(lParam)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return (WXHBRUSH) 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // wxUSE_CHOICE
|
#endif // wxUSE_CHOICE
|
||||||
|
@@ -128,27 +128,6 @@ static WNDPROC gs_wndprocEdit = (WNDPROC)NULL;
|
|||||||
// implementation
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
WXHBRUSH wxComboBox::OnCtlColor(WXHDC pDC,
|
|
||||||
WXHWND WXUNUSED(pWnd),
|
|
||||||
WXUINT WXUNUSED(nCtlColor),
|
|
||||||
WXUINT WXUNUSED(message),
|
|
||||||
WXWPARAM WXUNUSED(wParam),
|
|
||||||
WXLPARAM WXUNUSED(lParam))
|
|
||||||
{
|
|
||||||
HDC hdc = (HDC)pDC;
|
|
||||||
wxColour colBack = GetBackgroundColour();
|
|
||||||
|
|
||||||
if (!IsEnabled())
|
|
||||||
colBack = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
|
||||||
|
|
||||||
::SetBkColor(hdc, wxColourToRGB(colBack));
|
|
||||||
::SetTextColor(hdc, wxColourToRGB(GetForegroundColour()));
|
|
||||||
|
|
||||||
wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBack, wxSOLID);
|
|
||||||
|
|
||||||
return (WXHBRUSH)brush->GetResourceHandle();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxComboBox callbacks
|
// wxComboBox callbacks
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -286,6 +286,17 @@ void wxControl::DoGetBounds( RectangleType &rect ) const
|
|||||||
FrmGetObjectBounds(form,index,&rect);
|
FrmGetObjectBounds(form,index,&rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxControl::DoSetBounds( RectangleType &rect )
|
||||||
|
{
|
||||||
|
FormType* form = GetParentForm();
|
||||||
|
if(form==NULL)
|
||||||
|
return;
|
||||||
|
uint16_t index = FrmGetObjectIndex(form,GetId());
|
||||||
|
if(index==frmInvalidObjectId)
|
||||||
|
return;
|
||||||
|
FrmSetObjectBounds(form,index,&rect);
|
||||||
|
}
|
||||||
|
|
||||||
void wxControl::DoGetPosition( int *x, int *y ) const
|
void wxControl::DoGetPosition( int *x, int *y ) const
|
||||||
{
|
{
|
||||||
RectangleType rect;
|
RectangleType rect;
|
||||||
@@ -306,6 +317,18 @@ void wxControl::DoGetSize( int *width, int *height ) const
|
|||||||
*height = rect.extent.y;
|
*height = rect.extent.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxControl::DoMoveWindow(int x, int y, int width, int height)
|
||||||
|
{
|
||||||
|
wxRect area = GetRect();
|
||||||
|
RectangleType rect;
|
||||||
|
rect.topLeft.x = x;
|
||||||
|
rect.topLeft.y = y;
|
||||||
|
rect.extent.x = width;
|
||||||
|
rect.extent.y = height;
|
||||||
|
DoSetBounds(rect);
|
||||||
|
GetParent()->Refresh(true, &area);
|
||||||
|
}
|
||||||
|
|
||||||
bool wxControl::Enable(bool enable)
|
bool wxControl::Enable(bool enable)
|
||||||
{
|
{
|
||||||
ControlType *control = (ControlType *)GetObjectPtr();
|
ControlType *control = (ControlType *)GetObjectPtr();
|
||||||
@@ -468,17 +491,4 @@ void wxControl::OnEraseBackground(wxEraseEvent& event)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHBRUSH wxControl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
|
||||||
WXUINT WXUNUSED(message),
|
|
||||||
WXWPARAM WXUNUSED(wParam),
|
|
||||||
WXLPARAM WXUNUSED(lParam)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return (WXHBRUSH)0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// global functions
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#endif // wxUSE_CONTROLS
|
#endif // wxUSE_CONTROLS
|
||||||
|
109
src/palmos/datectrl.cpp
Normal file
109
src/palmos/datectrl.cpp
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: src/palmos/datectrl.cpp
|
||||||
|
// Purpose: wxDatePickerCtrl implementation
|
||||||
|
// Author: Wlodzimierz ABX Skiba
|
||||||
|
// Modified by:
|
||||||
|
// Created: 02/14/05
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Wlodzimierz Skiba
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// declarations
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// headers
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_DATEPICKCTRL
|
||||||
|
|
||||||
|
#include "wx/datectrl.h"
|
||||||
|
#include "wx/app.h"
|
||||||
|
#include "wx/intl.h"
|
||||||
|
#include "wx/dynlib.h"
|
||||||
|
|
||||||
|
#define _WX_DEFINE_DATE_EVENTS_
|
||||||
|
#include "wx/dateevt.h"
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// implementation
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxDatePickerCtrl creation
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bool wxDatePickerCtrl::Create(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxDateTime& dt,
|
||||||
|
const wxPoint& pos,
|
||||||
|
const wxSize& size,
|
||||||
|
long style,
|
||||||
|
const wxValidator& validator,
|
||||||
|
const wxString& name)
|
||||||
|
{
|
||||||
|
if(!wxControl::Create(parent, id, pos, size, style, validator, name))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
wxString label;
|
||||||
|
|
||||||
|
if ( dt.IsValid() )
|
||||||
|
label = _T("test2");
|
||||||
|
|
||||||
|
ig(!wxControl::PalmCreateControl(selectorTriggerCtl, label, pos, size))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxDatePickerCtrl geometry
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
wxSize wxDatePickerCtrl::DoGetBestSize() const
|
||||||
|
{
|
||||||
|
const int y = GetCharHeight();
|
||||||
|
|
||||||
|
return wxSize(DEFAULT_ITEM_WIDTH, EDIT_HEIGHT_FROM_CHAR_HEIGHT(y));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxDatePickerCtrl operations
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void wxDatePickerCtrl::SetValue(const wxDateTime& dt)
|
||||||
|
{
|
||||||
|
SetLabel(_T("test1"));
|
||||||
|
}
|
||||||
|
|
||||||
|
wxDateTime wxDatePickerCtrl::GetValue() const
|
||||||
|
{
|
||||||
|
wxDateTime dt;
|
||||||
|
// TODO
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxDatePickerCtrl::SetRange(const wxDateTime& dt1, const wxDateTime& dt2)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
bool wxDatePickerCtrl::GetRange(wxDateTime *dt1, wxDateTime *dt2) const
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_DATEPICKCTRL
|
||||||
|
|
@@ -42,14 +42,14 @@ struct WXDLLEXPORT wxPaintDCInfo
|
|||||||
{
|
{
|
||||||
wxPaintDCInfo(wxWindow *win, wxDC *dc)
|
wxPaintDCInfo(wxWindow *win, wxDC *dc)
|
||||||
{
|
{
|
||||||
hwnd = win->GetHWND();
|
handle = win->GetWinHandle();
|
||||||
hdc = dc->GetHDC();
|
hdc = dc->GetHDC();
|
||||||
count = 1;
|
count = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHWND hwnd; // window for this DC
|
WXWINHANDLE handle; // window for this DC
|
||||||
WXHDC hdc; // the DC handle
|
WXHDC hdc; // the DC handle
|
||||||
size_t count; // usage count
|
size_t count; // usage count
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "wx/arrimpl.cpp"
|
#include "wx/arrimpl.cpp"
|
||||||
|
@@ -105,8 +105,6 @@ BEGIN_EVENT_TABLE(wxDialog, wxDialogBase)
|
|||||||
EVT_BUTTON(wxID_APPLY, wxDialog::OnApply)
|
EVT_BUTTON(wxID_APPLY, wxDialog::OnApply)
|
||||||
EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel)
|
EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel)
|
||||||
|
|
||||||
EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged)
|
|
||||||
|
|
||||||
EVT_CLOSE(wxDialog::OnCloseWindow)
|
EVT_CLOSE(wxDialog::OnCloseWindow)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@@ -160,23 +158,6 @@ bool wxDialog::Create(wxWindow *parent,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// deprecated ctor
|
|
||||||
wxDialog::wxDialog(wxWindow *parent,
|
|
||||||
const wxString& title,
|
|
||||||
bool WXUNUSED(modal),
|
|
||||||
int x,
|
|
||||||
int y,
|
|
||||||
int w,
|
|
||||||
int h,
|
|
||||||
long style,
|
|
||||||
const wxString& name)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxDialog::SetModal(bool WXUNUSED(flag))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
wxDialog::~wxDialog()
|
wxDialog::~wxDialog()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -185,11 +166,6 @@ wxDialog::~wxDialog()
|
|||||||
// showing the dialogs
|
// showing the dialogs
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool wxDialog::IsModalShowing() const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxWindow *wxDialog::FindSuitableParent() const
|
wxWindow *wxDialog::FindSuitableParent() const
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -234,16 +210,3 @@ void wxDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
|
|||||||
void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// dialog window proc
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
WXLRESULT wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
@@ -70,7 +70,6 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
|
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
|
||||||
EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
|
|
||||||
EVT_PAINT(wxFrame::OnPaint)
|
EVT_PAINT(wxFrame::OnPaint)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@@ -232,11 +231,6 @@ bool wxFrame::HandleMenuSelect(EventType* event)
|
|||||||
|
|
||||||
#endif // wxUSE_MENUS_NATIVE
|
#endif // wxUSE_MENUS_NATIVE
|
||||||
|
|
||||||
// Responds to colour changes, and passes event on to children.
|
|
||||||
void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxFrame::OnPaint(wxPaintEvent& event)
|
void wxFrame::OnPaint(wxPaintEvent& event)
|
||||||
{
|
{
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
@@ -279,24 +273,6 @@ void wxFrame::IconizeChildFrames(bool bIconize)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
|
||||||
// message processing
|
|
||||||
// ===========================================================================
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// our private (non virtual) message handlers
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
bool wxFrame::HandlePaint()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxFrame::HandleSize(int x, int y, WXUINT id)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxFrame size management: we exclude the areas taken by menu/status/toolbars
|
// wxFrame size management: we exclude the areas taken by menu/status/toolbars
|
||||||
// from the client area, so the client area is what's really available for the
|
// from the client area, so the client area is what's really available for the
|
||||||
|
@@ -191,11 +191,6 @@ void wxListCtrl::SetSingleStyle(long style, bool add)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the whole window style
|
|
||||||
void wxListCtrl::SetWindowStyleFlag(long flag)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// accessors
|
// accessors
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -137,7 +137,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow)
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame)
|
BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame)
|
||||||
EVT_SIZE(wxMDIParentFrame::OnSize)
|
EVT_SIZE(wxMDIParentFrame::OnSize)
|
||||||
EVT_SYS_COLOUR_CHANGED(wxMDIParentFrame::OnSysColourChanged)
|
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxMDIChildFrame, wxFrame)
|
BEGIN_EVENT_TABLE(wxMDIChildFrame, wxFrame)
|
||||||
@@ -201,12 +200,6 @@ wxMDIClientWindow *wxMDIParentFrame::OnCreateClient()
|
|||||||
return new wxMDIClientWindow;
|
return new wxMDIClientWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Responds to colour changes, and passes event on to children.
|
|
||||||
void wxMDIParentFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|
||||||
{
|
|
||||||
event.Skip();
|
|
||||||
}
|
|
||||||
|
|
||||||
WXHICON wxMDIParentFrame::GetDefaultIcon() const
|
WXHICON wxMDIParentFrame::GetDefaultIcon() const
|
||||||
{
|
{
|
||||||
// we don't have any standard icons (any more)
|
// we don't have any standard icons (any more)
|
||||||
@@ -248,16 +241,6 @@ WXLRESULT wxMDIParentFrame::MSWWindowProc(WXUINT message,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxMDIParentFrame::HandleActivate(int state, bool minimized, WXHWND activate)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
WXLRESULT wxMDIParentFrame::MSWDefWindowProc(WXUINT message,
|
WXLRESULT wxMDIParentFrame::MSWDefWindowProc(WXUINT message,
|
||||||
WXWPARAM wParam,
|
WXWPARAM wParam,
|
||||||
WXLPARAM lParam)
|
WXLPARAM lParam)
|
||||||
@@ -340,11 +323,6 @@ WXLRESULT wxMDIChildFrame::MSWWindowProc(WXUINT message,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxMDIChildFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxMDIChildFrame::HandleMDIActivate(long WXUNUSED(activate),
|
bool wxMDIChildFrame::HandleMDIActivate(long WXUNUSED(activate),
|
||||||
WXHWND hwndAct,
|
WXHWND hwndAct,
|
||||||
WXHWND hwndDeact)
|
WXHWND hwndDeact)
|
||||||
@@ -357,11 +335,6 @@ bool wxMDIChildFrame::HandleWindowPosChanging(void *pos)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxMDIChildFrame::HandleGetMinMaxInfo(void *mmInfo)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// MDI specific message translation/preprocessing
|
// MDI specific message translation/preprocessing
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@@ -72,13 +72,13 @@ wxWindow* wxWindow::GetWindowChild(wxWindowID id)
|
|||||||
// create wxWin window from a native HWND
|
// create wxWin window from a native HWND
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
|
wxWindow* wxWindow::CreateWindowFromWinHandle(wxWindow* parent, WXWINHANDLE handle)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure the window style (etc.) reflects the HWND style (roughly)
|
// Make sure the window style (etc.) reflects the WinHandle style (roughly)
|
||||||
void wxWindow::AdoptAttributesFromHWND(void)
|
void wxWindow::AdoptAttributesFromWinHandle(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -120,12 +120,6 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
WXHBRUSH wxScrollBar::OnCtlColor(WXHDC WXUNUSED(pDC), WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
|
||||||
WXUINT WXUNUSED(message), WXWPARAM WXUNUSED(wParam), WXLPARAM WXUNUSED(lParam))
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxScrollBar::Command(wxCommandEvent& event)
|
void wxScrollBar::Command(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@@ -117,7 +117,6 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
// wxSL_RIGHT is ignored - always off
|
// wxSL_RIGHT is ignored - always off
|
||||||
// wxSL_TOP is ignored - always off
|
// wxSL_TOP is ignored - always off
|
||||||
// wxSL_SELRANGE is ignored - always off
|
// wxSL_SELRANGE is ignored - always off
|
||||||
// wxSL_INVERSE is ignored - always off
|
|
||||||
// wxSL_VERTICAL is impossible in native form
|
// wxSL_VERTICAL is impossible in native form
|
||||||
wxCHECK_MSG(!(style & wxSL_VERTICAL), false, _T("non vertical slider on PalmOS"));
|
wxCHECK_MSG(!(style & wxSL_VERTICAL), false, _T("non vertical slider on PalmOS"));
|
||||||
|
|
||||||
@@ -196,6 +195,14 @@ int wxSlider::GetPageSize() const
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int wxSlider::PalmInvertOrNot(int value) const
|
||||||
|
{
|
||||||
|
if (m_windowStyle & wxSL_INVERSE)
|
||||||
|
return (GetMax() + GetMin()) - value;
|
||||||
|
else
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
int wxSlider::GetValue() const
|
int wxSlider::GetValue() const
|
||||||
{
|
{
|
||||||
ControlType *control = (ControlType *)GetObjectPtr();
|
ControlType *control = (ControlType *)GetObjectPtr();
|
||||||
@@ -203,12 +210,12 @@ int wxSlider::GetValue() const
|
|||||||
return 0;
|
return 0;
|
||||||
uint16_t ret;
|
uint16_t ret;
|
||||||
CtlGetSliderValues(control, NULL, NULL, NULL, &ret);
|
CtlGetSliderValues(control, NULL, NULL, NULL, &ret);
|
||||||
return ret;
|
return PalmInvertOrNot(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxSlider::SetValue(int value)
|
void wxSlider::SetValue(int value)
|
||||||
{
|
{
|
||||||
SetIntValue(value);
|
SetIntValue(PalmInvertOrNot(value));
|
||||||
m_oldValue = m_oldPos = value;
|
m_oldValue = m_oldPos = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -328,7 +335,7 @@ bool wxSlider::SendUpdatedEvent()
|
|||||||
bool wxSlider::SendScrollEvent(EventType* event)
|
bool wxSlider::SendScrollEvent(EventType* event)
|
||||||
{
|
{
|
||||||
wxEventType scrollEvent;
|
wxEventType scrollEvent;
|
||||||
int newPos = event->data.ctlRepeat.value;
|
int newPos = PalmInvertOrNot(event->data.ctlRepeat.value);
|
||||||
if ( newPos == m_oldPos )
|
if ( newPos == m_oldPos )
|
||||||
{
|
{
|
||||||
// nothing changed since last event
|
// nothing changed since last event
|
||||||
|
@@ -48,8 +48,6 @@
|
|||||||
wxStatusBarPalm::wxStatusBarPalm()
|
wxStatusBarPalm::wxStatusBarPalm()
|
||||||
{
|
{
|
||||||
SetParent(NULL);
|
SetParent(NULL);
|
||||||
m_hWnd = 0;
|
|
||||||
m_windowId = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxStatusBarPalm::Create(wxWindow *parent,
|
bool wxStatusBarPalm::Create(wxWindow *parent,
|
||||||
@@ -68,7 +66,6 @@ bool wxStatusBarPalm::Create(wxWindow *parent,
|
|||||||
parent->AddChild(this);
|
parent->AddChild(this);
|
||||||
|
|
||||||
SetFieldsCount(1);
|
SetFieldsCount(1);
|
||||||
SubclassWin(m_hWnd);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,6 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED)
|
|||||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING)
|
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxTabCtrl, wxControl)
|
BEGIN_EVENT_TABLE(wxTabCtrl, wxControl)
|
||||||
EVT_SYS_COLOUR_CHANGED(wxTabCtrl::OnSysColourChanged)
|
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
wxTabCtrl::wxTabCtrl()
|
wxTabCtrl::wxTabCtrl()
|
||||||
@@ -59,11 +58,6 @@ bool wxTabCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Responds to colour changes, and passes event on to children.
|
|
||||||
void wxTabCtrl::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete all items
|
// Delete all items
|
||||||
bool wxTabCtrl::DeleteAllItems()
|
bool wxTabCtrl::DeleteAllItems()
|
||||||
{
|
{
|
||||||
|
@@ -217,20 +217,11 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure the window style (etc.) reflects the HWND style (roughly)
|
|
||||||
void wxTextCtrl::AdoptAttributesFromHWND()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
WXDWORD wxTextCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
|
WXDWORD wxTextCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::SetWindowStyleFlag(long style)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// set/get the controls text
|
// set/get the controls text
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -567,15 +558,6 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
|
||||||
WXUINT WXUNUSED(message),
|
|
||||||
WXWPARAM WXUNUSED(wParam),
|
|
||||||
WXLPARAM WXUNUSED(lParam)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return (WXHBRUSH) 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTextCtrl::AdjustSpaceLimit()
|
bool wxTextCtrl::AdjustSpaceLimit()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -93,7 +93,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl)
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxToolBar, wxToolBarBase)
|
BEGIN_EVENT_TABLE(wxToolBar, wxToolBarBase)
|
||||||
EVT_MOUSE_EVENTS(wxToolBar::OnMouseEvent)
|
EVT_MOUSE_EVENTS(wxToolBar::OnMouseEvent)
|
||||||
EVT_SYS_COLOUR_CHANGED(wxToolBar::OnSysColourChanged)
|
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -248,14 +247,6 @@ void wxToolBar::UpdateSize()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// toolbar styles
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void wxToolBar::SetWindowStyleFlag(long style)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// tool state
|
// tool state
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -276,11 +267,6 @@ void wxToolBar::DoSetToggle(wxToolBarToolBase *WXUNUSED(tool), bool WXUNUSED(tog
|
|||||||
// event handlers
|
// event handlers
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// Responds to colour changes, and passes event on to children.
|
|
||||||
void wxToolBar::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxToolBar::OnMouseEvent(wxMouseEvent& event)
|
void wxToolBar::OnMouseEvent(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@@ -80,11 +80,6 @@ WXDWORD wxTopLevelWindowPalm::PalmGetStyle(long style, WXDWORD *exflags) const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHWND wxTopLevelWindowPalm::PalmGetParent() const
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTopLevelWindowPalm::Create(wxWindow *parent,
|
bool wxTopLevelWindowPalm::Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
@@ -147,6 +142,18 @@ wxTopLevelWindowPalm::~wxTopLevelWindowPalm()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// implementation
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
WXWINHANDLE wxTopLevelWindowPalm::GetWinHandle() const
|
||||||
|
{
|
||||||
|
FormType *form = GetForm();
|
||||||
|
if(form)
|
||||||
|
return FrmGetWindowHandle(form);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxTopLevelWindowPalm showing
|
// wxTopLevelWindowPalm showing
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -233,15 +240,11 @@ FormType *wxTopLevelWindowPalm::GetForm() const
|
|||||||
return FrmGetActiveForm();
|
return FrmGetActiveForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __WXWINCE__
|
|
||||||
|
|
||||||
bool wxTopLevelWindowPalm::SetShape(const wxRegion& region)
|
bool wxTopLevelWindowPalm::SetShape(const wxRegion& region)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !__WXWINCE__
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxTopLevelWindow native event handling
|
// wxTopLevelWindow native event handling
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -152,28 +152,3 @@ void wxDisplaySizeMM(int *width, int *height)
|
|||||||
void wxClientDisplayRect(int *x, int *y, int *width, int *height)
|
void wxClientDisplayRect(int *x, int *y, int *width, int *height)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// window information functions
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
wxString WXDLLEXPORT wxGetWindowText(WXHWND hWnd)
|
|
||||||
{
|
|
||||||
wxString str;
|
|
||||||
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxString WXDLLEXPORT wxGetWindowClass(WXHWND hWnd)
|
|
||||||
{
|
|
||||||
wxString str;
|
|
||||||
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
WXWORD WXDLLEXPORT wxGetWindowId(WXHWND hWnd)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -93,10 +93,6 @@
|
|||||||
wxMenu *wxCurrentPopupMenu = NULL;
|
wxMenu *wxCurrentPopupMenu = NULL;
|
||||||
#endif // wxUSE_MENUS_NATIVE
|
#endif // wxUSE_MENUS_NATIVE
|
||||||
|
|
||||||
// true if we had already created the std colour map, used by
|
|
||||||
// wxGetStdColourMap() and wxWindow::OnSysColourChanged() (FIXME-MT)
|
|
||||||
static bool gs_hasStdCmap = false;
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// private functions
|
// private functions
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -218,7 +214,6 @@ wxCONSTRUCTOR_DUMMY(wxWindow)
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxWindowPalm, wxWindowBase)
|
BEGIN_EVENT_TABLE(wxWindowPalm, wxWindowBase)
|
||||||
EVT_ERASE_BACKGROUND(wxWindowPalm::OnEraseBackground)
|
EVT_ERASE_BACKGROUND(wxWindowPalm::OnEraseBackground)
|
||||||
EVT_SYS_COLOUR_CHANGED(wxWindowPalm::OnSysColourChanged)
|
|
||||||
EVT_INIT_DIALOG(wxWindowPalm::OnInitDialog)
|
EVT_INIT_DIALOG(wxWindowPalm::OnInitDialog)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@@ -237,23 +232,19 @@ wxWindow *wxWindowPalm::FindItem(long id) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find an item given the MS Windows handle
|
// Find an item given the MS Windows handle
|
||||||
wxWindow *wxWindowPalm::FindItemByHWND(WXHWND hWnd, bool controlOnly) const
|
wxWindow *wxWindowPalm::FindItemByWinHandle(WXWINHANDLE handle, bool controlOnly) const
|
||||||
{
|
{
|
||||||
|
// TODO
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default command handler
|
|
||||||
bool wxWindowPalm::PalmCommand(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// constructors and such
|
// constructors and such
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxWindowPalm::Init()
|
void wxWindowPalm::Init()
|
||||||
{
|
{
|
||||||
|
m_handle = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
@@ -263,11 +254,11 @@ wxWindowPalm::~wxWindowPalm()
|
|||||||
|
|
||||||
// real construction (Init() must have been called before!)
|
// real construction (Init() must have been called before!)
|
||||||
bool wxWindowPalm::Create(wxWindow *parent,
|
bool wxWindowPalm::Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
long style,
|
long style,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( parent, false, wxT("can't create wxWindow without parent") );
|
wxCHECK_MSG( parent, false, wxT("can't create wxWindow without parent") );
|
||||||
|
|
||||||
@@ -417,31 +408,10 @@ bool wxWindowPalm::ScrollPages(int pages)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// subclassing
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void wxWindowPalm::SubclassWin(WXHWND hWnd)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowPalm::UnsubclassWin()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxCheckWindowWndProc(WXHWND hWnd, WXFARPROC wndProc)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Style handling
|
// Style handling
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxWindowPalm::SetWindowStyleFlag(long flags)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
WXDWORD wxWindowPalm::PalmGetStyle(long flags, WXDWORD *exstyle) const
|
WXDWORD wxWindowPalm::PalmGetStyle(long flags, WXDWORD *exstyle) const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@@ -452,11 +422,6 @@ void wxWindowPalm::SetupColours()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindowPalm::IsMouseInWindow() const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowPalm::OnInternalIdle()
|
void wxWindowPalm::OnInternalIdle()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -477,6 +442,23 @@ void wxWindowPalm::Thaw()
|
|||||||
|
|
||||||
void wxWindowPalm::Refresh(bool eraseBack, const wxRect *rect)
|
void wxWindowPalm::Refresh(bool eraseBack, const wxRect *rect)
|
||||||
{
|
{
|
||||||
|
WinHandle handle = GetWinHandle();
|
||||||
|
if(handle)
|
||||||
|
{
|
||||||
|
if(rect)
|
||||||
|
{
|
||||||
|
RectangleType dirtyRect;
|
||||||
|
dirtyRect.topLeft.x = rect->GetX();
|
||||||
|
dirtyRect.topLeft.y = rect->GetY();
|
||||||
|
dirtyRect.extent.x = rect->GetWidth();
|
||||||
|
dirtyRect.extent.y = rect->GetHeight();
|
||||||
|
WinInvalidateRect(handle, &dirtyRect);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WinInvalidateWindow(handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowPalm::Update()
|
void wxWindowPalm::Update()
|
||||||
@@ -552,6 +534,61 @@ void wxWindowPalm::DoMoveWindow(int x, int y, int width, int height)
|
|||||||
// width/height
|
// width/height
|
||||||
void wxWindowPalm::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
void wxWindowPalm::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||||
{
|
{
|
||||||
|
// get the current size and position...
|
||||||
|
int currentX, currentY;
|
||||||
|
GetPosition(¤tX, ¤tY);
|
||||||
|
int currentW,currentH;
|
||||||
|
GetSize(¤tW, ¤tH);
|
||||||
|
|
||||||
|
// ... and don't do anything (avoiding flicker) if it's already ok
|
||||||
|
if ( x == currentX && y == currentY &&
|
||||||
|
width == currentW && height == currentH )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( x == wxDefaultCoord && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE) )
|
||||||
|
x = currentX;
|
||||||
|
if ( y == wxDefaultCoord && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE) )
|
||||||
|
y = currentY;
|
||||||
|
|
||||||
|
AdjustForParentClientOrigin(x, y, sizeFlags);
|
||||||
|
|
||||||
|
wxSize size = wxDefaultSize;
|
||||||
|
if ( width == wxDefaultCoord )
|
||||||
|
{
|
||||||
|
if ( sizeFlags & wxSIZE_AUTO_WIDTH )
|
||||||
|
{
|
||||||
|
size = DoGetBestSize();
|
||||||
|
width = size.x;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// just take the current one
|
||||||
|
width = currentW;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( height == wxDefaultCoord )
|
||||||
|
{
|
||||||
|
if ( sizeFlags & wxSIZE_AUTO_HEIGHT )
|
||||||
|
{
|
||||||
|
if ( size.x == wxDefaultCoord )
|
||||||
|
{
|
||||||
|
size = DoGetBestSize();
|
||||||
|
}
|
||||||
|
//else: already called DoGetBestSize() above
|
||||||
|
|
||||||
|
height = size.y;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// just take the current one
|
||||||
|
height = currentH;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DoMoveWindow(x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowPalm::DoSetClientSize(int width, int height)
|
void wxWindowPalm::DoSetClientSize(int width, int height)
|
||||||
@@ -601,60 +638,15 @@ bool wxWindowPalm::DoPopupMenu(wxMenu *menu, int x, int y)
|
|||||||
|
|
||||||
#endif // wxUSE_MENUS_NATIVE
|
#endif // wxUSE_MENUS_NATIVE
|
||||||
|
|
||||||
// ===========================================================================
|
|
||||||
// pre/post message processing
|
|
||||||
// ===========================================================================
|
|
||||||
|
|
||||||
WXLRESULT wxWindowPalm::PalmDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::PalmProcessMessage(WXMSG* pMsg)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::PalmTranslateMessage(WXMSG* pMsg)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::PalmShouldPreProcessMessage(WXMSG* WXUNUSED(pMsg))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Main wxWidgets window proc and the window proc for wxWindow
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// Hook for new window just as it's being created, when the window isn't yet
|
|
||||||
// associated with the handle
|
|
||||||
|
|
||||||
// implementation of wxWindowCreationHook class: it just sets gs_winBeingCreated to the
|
|
||||||
// window being created and insures that it's always unset back later
|
|
||||||
wxWindowCreationHook::wxWindowCreationHook(wxWindowPalm *winBeingCreated)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
wxWindowCreationHook::~wxWindowCreationHook()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
WXLRESULT wxWindowPalm::PalmWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxWindow <-> HWND map
|
// wxWindow <-> HWND map
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxWinHashTable *wxWinHandleHash = NULL;
|
wxWinHashTable *wxWinHandleHash = NULL;
|
||||||
|
|
||||||
wxWindow *wxFindWinFromHandle(WXHWND hWnd)
|
wxWindow *wxFindWinFromWinHandle(WXWINHANDLE handle)
|
||||||
{
|
{
|
||||||
|
// TODO
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -663,34 +655,23 @@ void wxRemoveHandleAssociation(wxWindowPalm *win)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// various Palm speciic class dependent functions
|
// various Palm specific class dependent functions
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// Default destroyer - override if you destroy it in some other way
|
|
||||||
// (e.g. with MDI child windows)
|
|
||||||
void wxWindowPalm::PalmDestroyWindow()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::PalmGetCreateWindowCoords(const wxPoint& pos,
|
bool wxWindowPalm::PalmGetCreateWindowCoords(const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
int& x, int& y,
|
int& x, int& y,
|
||||||
int& w, int& h) const
|
int& w, int& h) const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHWND wxWindowPalm::PalmGetParent() const
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::PalmCreate(const wxChar *wclass,
|
bool wxWindowPalm::PalmCreate(const wxChar *wclass,
|
||||||
const wxChar *title,
|
const wxChar *title,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
WXDWORD style,
|
WXDWORD style,
|
||||||
WXDWORD extendedStyle)
|
WXDWORD extendedStyle)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -699,183 +680,15 @@ bool wxWindowPalm::PalmCreate(const wxChar *wclass,
|
|||||||
// Palm message handlers
|
// Palm message handlers
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// end session messages
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleQueryEndSession(long logOff, bool *mayEnd)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleEndSession(bool endSession, long logOff)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// window creation/destruction
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleCreate(WXLPCREATESTRUCT cs, bool *mayCreate)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleDestroy()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// activation/focus
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleActivate(int state,
|
|
||||||
bool WXUNUSED(minimized),
|
|
||||||
WXHWND WXUNUSED(activate))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleSetFocus(WXHWND hwnd)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleKillFocus(WXHWND hwnd)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// miscellaneous
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleShow(bool show, int WXUNUSED(status))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleInitDialog(WXHWND WXUNUSED(hWndFocus))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleDropFiles(WXWPARAM wParam)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleSetCursor(WXHWND WXUNUSED(hWnd),
|
|
||||||
short nHitTest,
|
|
||||||
int WXUNUSED(mouseMsg))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// owner drawn stuff
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#if (wxUSE_OWNER_DRAWN && wxUSE_MENUS_NATIVE) || \
|
|
||||||
(wxUSE_CONTROLS && !defined(__WXUNIVERSAL__))
|
|
||||||
#define WXUNUSED_UNLESS_ODRAWN(param) param
|
|
||||||
#else
|
|
||||||
#define WXUNUSED_UNLESS_ODRAWN(param)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool
|
|
||||||
wxWindowPalm::PalmOnDrawItem(int WXUNUSED_UNLESS_ODRAWN(id),
|
|
||||||
WXDRAWITEMSTRUCT * WXUNUSED_UNLESS_ODRAWN(itemStruct))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
wxWindowPalm::PalmOnMeasureItem(int WXUNUSED_UNLESS_ODRAWN(id),
|
|
||||||
WXMEASUREITEMSTRUCT *
|
|
||||||
WXUNUSED_UNLESS_ODRAWN(itemStruct))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// colours and palettes
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleSysColorChange()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleDisplayChange()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleCtlColor(WXHBRUSH *brush,
|
|
||||||
WXHDC pDC,
|
|
||||||
WXHWND pWnd,
|
|
||||||
WXUINT nCtlColor,
|
|
||||||
WXUINT message,
|
|
||||||
WXWPARAM wParam,
|
|
||||||
WXLPARAM lParam)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define for each class of dialog and control
|
|
||||||
WXHBRUSH wxWindowPalm::OnCtlColor(WXHDC WXUNUSED(hDC),
|
|
||||||
WXHWND WXUNUSED(hWnd),
|
|
||||||
WXUINT WXUNUSED(nCtlColor),
|
|
||||||
WXUINT WXUNUSED(message),
|
|
||||||
WXWPARAM WXUNUSED(wParam),
|
|
||||||
WXLPARAM WXUNUSED(lParam))
|
|
||||||
{
|
|
||||||
return (WXHBRUSH)0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandlePaletteChanged(WXHWND hWndPalChange)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleCaptureChanged(WXHWND hWndGainedCapture)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleQueryNewPalette()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Responds to colour changes: passes event on to children.
|
|
||||||
void wxWindowPalm::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// painting
|
// painting
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
bool wxWindowPalm::HandlePaint()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Can be called from an application's OnPaint handler
|
// Can be called from an application's OnPaint handler
|
||||||
void wxWindowPalm::OnPaint(wxPaintEvent& event)
|
void wxWindowPalm::OnPaint(wxPaintEvent& event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindowPalm::HandleEraseBkgnd(WXHDC hdc)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowPalm::OnEraseBackground(wxEraseEvent& event)
|
void wxWindowPalm::OnEraseBackground(wxEraseEvent& event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -884,16 +697,6 @@ void wxWindowPalm::OnEraseBackground(wxEraseEvent& event)
|
|||||||
// moving and resizing
|
// moving and resizing
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
bool wxWindowPalm::HandleMinimize()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleMaximize()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleMove(int x, int y)
|
bool wxWindowPalm::HandleMove(int x, int y)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -904,106 +707,6 @@ bool wxWindowPalm::HandleMoving(wxRect& rect)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindowPalm::HandleSize(int WXUNUSED(w), int WXUNUSED(h),
|
|
||||||
WXUINT WXUNUSED(flag))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleSizing(wxRect& rect)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleGetMinMaxInfo(void *mmInfo)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// command messages
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// mouse events
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void wxWindowPalm::InitMouseEvent(wxMouseEvent& event,
|
|
||||||
int x, int y,
|
|
||||||
WXUINT flags)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Windows doesn't send the mouse events to the static controls (which are
|
|
||||||
// transparent in the sense that their WM_NCHITTEST handler returns
|
|
||||||
// HTTRANSPARENT) at all but we want all controls to receive the mouse events
|
|
||||||
// and so we manually check if we don't have a child window under mouse and if
|
|
||||||
// we do, send the event to it instead of the window Windows had sent WM_XXX
|
|
||||||
// to.
|
|
||||||
//
|
|
||||||
// Notice that this is not done for the mouse move events because this could
|
|
||||||
// (would?) be too slow, but only for clicks which means that the static texts
|
|
||||||
// still don't get move, enter nor leave events.
|
|
||||||
static wxWindowPalm *FindWindowForMouseEvent(wxWindowPalm *win, int *x, int *y) //TW:REQ:Univ
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleMouseMove(int x, int y, WXUINT flags)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleMouseWheel(WXWPARAM wParam, WXLPARAM lParam)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// keyboard handling
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// create the key event of the given type for the given key - used by
|
|
||||||
// HandleChar and HandleKeyDown/Up
|
|
||||||
wxKeyEvent wxWindowPalm::CreateKeyEvent(wxEventType evType,
|
|
||||||
int id,
|
|
||||||
WXLPARAM lParam,
|
|
||||||
WXWPARAM wParam) const
|
|
||||||
{
|
|
||||||
wxKeyEvent event(evType);
|
|
||||||
|
|
||||||
return event;
|
|
||||||
}
|
|
||||||
|
|
||||||
// isASCII is true only when we're called from WM_CHAR handler and not from
|
|
||||||
// WM_KEYDOWN one
|
|
||||||
bool wxWindowPalm::HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// joystick
|
// joystick
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -1018,8 +721,9 @@ bool wxWindowPalm::HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags)
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
bool wxWindowPalm::PalmOnScroll(int orientation, WXWORD wParam,
|
bool wxWindowPalm::PalmOnScroll(int orientation, WXWORD wParam,
|
||||||
WXWORD pos, WXHWND control)
|
WXWORD pos, WXWINHANDLE control)
|
||||||
{
|
{
|
||||||
|
// TODO
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1027,53 +731,9 @@ bool wxWindowPalm::PalmOnScroll(int orientation, WXWORD wParam,
|
|||||||
// global functions
|
// global functions
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont *the_font)
|
void wxGetCharSize(WXWINHANDLE wnd, int *x, int *y, const wxFont *the_font)
|
||||||
{
|
{
|
||||||
}
|
// TODO
|
||||||
|
|
||||||
// Returns 0 if was a normal ASCII value, not a special key. This indicates that
|
|
||||||
// the key should be ignored by WM_KEYDOWN and processed by WM_CHAR instead.
|
|
||||||
int wxCharCodePalmToWX(int keySym, WXLPARAM lParam)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxCharCodeWXToPalm(int id, bool *isVirtual)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxGetKeyState(wxKeyCode key)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxWindow *wxGetActiveWindow()
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern wxWindow *wxGetWindowFromHWND(WXHWND hWnd)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the wxWindow at the current mouse position, returning the mouse
|
|
||||||
// position.
|
|
||||||
wxWindow* wxFindWindowAtPointer(wxPoint& pt)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the current mouse position.
|
|
||||||
wxPoint wxGetMousePosition()
|
|
||||||
{
|
|
||||||
return wxPoint(0, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_HOTKEY
|
#if wxUSE_HOTKEY
|
||||||
@@ -1088,15 +748,6 @@ bool wxWindowPalm::UnregisterHotKey(int hotkeyId)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_ACCEL
|
|
||||||
|
|
||||||
bool wxWindowPalm::HandleHotKey(WXWPARAM wParam, WXLPARAM lParam)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // wxUSE_ACCEL
|
|
||||||
|
|
||||||
#endif // wxUSE_HOTKEY
|
#endif // wxUSE_HOTKEY
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user