wxWINDOW_VARIANT_MAX
};
+#if wxUSE_SYSTEM_OPTIONS
+ #define wxWINDOW_DEFAULT_VARIANT wxT("window-default-variant")
+#endif
+
// ----------------------------------------------------------------------------
// (pseudo)template list classes
// ----------------------------------------------------------------------------
// reset the cached best size value so it will be recalculated the
// next time it is needed.
- void InvalidateBestSize() { m_bestSizeCache = wxDefaultSize; }
+ void InvalidateBestSize();
void CacheBestSize(const wxSize& size) const
{ wxConstCast(this, wxWindowBase)->m_bestSizeCache = size; }
// set min/max size of the window
virtual void SetSizeHints( int minW, int minH,
int maxW = wxDefaultCoord, int maxH = wxDefaultCoord,
- int incW = wxDefaultCoord, int incH = wxDefaultCoord );
+ int incW = wxDefaultCoord, int incH = wxDefaultCoord )
+ {
+ DoSetSizeHints(minW, minH, maxW, maxH, incW, incH);
+ }
+
void SetSizeHints( const wxSize& minSize,
const wxSize& maxSize=wxDefaultSize,
const wxSize& incSize=wxDefaultSize)
{
- SetSizeHints(minSize.x, minSize.y,
- maxSize.x, maxSize.y,
- incSize.x, incSize.y);
+ DoSetSizeHints(minSize.x, minSize.y,
+ maxSize.x, maxSize.y,
+ incSize.x, incSize.y);
}
+ virtual void DoSetSizeHints(int minW, int minH,
+ int maxW = wxDefaultCoord, int maxH = wxDefaultCoord,
+ int incW = wxDefaultCoord, int incH = wxDefaultCoord );
+
virtual void SetVirtualSizeHints( int minW, int minH,
int maxW = wxDefaultCoord, int maxH = wxDefaultCoord );
void SetVirtualSizeHints( const wxSize& minSize,
virtual void SetFocusFromKbd() { SetFocus(); }
// return the window which currently has the focus or NULL
- static wxWindow *FindFocus() /* = 0: implement in derived classes */;
+ static wxWindow *FindFocus();
+
+ static wxWindow *DoFindFocus() /* = 0: implement in derived classes */;
// can this window have focus?
virtual bool AcceptsFocus() const { return IsShown() && IsEnabled(); }
}
wxColour GetBackgroundColour() const;
+ // if the window shouldn't inherit its colour from the parent, override
+ // this function to return true
+ //
+ // this is currently only used by wxMSW and wxUniv but should be useful for
+ // the other ports too
+ virtual bool ProvidesBackground() const { return false; }
+
virtual bool SetForegroundColour(const wxColour& colour);
void SetOwnForegroundColour(const wxColour& colour)
{
// is only used for wxWin itself or for user code which wants to call
// platform-specific APIs
virtual WXWidget GetHandle() const = 0;
+ // associate the window with a new native handle
+ virtual void AssociateHandle(WXWidget WXUNUSED(handle)) { }
+ // dissociate the current native handle from the window
+ virtual void DissociateHandle() { }
#if wxUSE_PALETTE
// Store the palette used by DCs in wxWindow so that the dcs can share
// Send the wxWindowDestroyEvent
void SendDestroyEvent();
+ // returns the main window of composite control; this is the window
+ // that FindFocus returns if the focus is in one of composite control's
+ // windows
+ virtual wxWindow *GetMainWindowOfCompositeControl()
+ { return (wxWindow*)this; }
+
// the window id - a number which uniquely identifies a window among
// its siblings unless it is wxID_ANY
wxWindowID m_windowId;
void SetBestSize(const wxSize& size) { SetBestFittingSize(size); }
// set the initial window size if none is given (i.e. at least one of the
- // components of the size passed to ctor/Create() is -1)
+ // components of the size passed to ctor/Create() is wxDefaultCoord)
//
// normally just calls SetBestSize() for controls, but can be overridden
// not to do it for the controls which have to do some additional
// ----------------------------------------------------------------------------
// include the declaration of the platform-specific class
-#if defined(__WXMSW__)
+#if defined(__WXPALMOS__)
+ #ifdef __WXUNIVERSAL__
+ #define wxWindowNative wxWindowPalm
+ #else // !wxUniv
+ #define wxWindowPalm wxWindow
+ #endif // wxUniv/!wxUniv
+ #include "wx/palmos/window.h"
+#elif defined(__WXMSW__)
#ifdef __WXUNIVERSAL__
#define wxWindowNative wxWindowMSW
#else // !wxUniv
{
public:
wxWindowAccessible(wxWindow* win): wxAccessible(win) { if (win) win->SetAccessible(this); }
- virtual ~wxWindowAccessible() {};
+ virtual ~wxWindowAccessible() {}
// Overridables