wxPanel), the size returned by this function will be the same as the size
the window would have had after calling Fit().
- Note that when you write your own widget you need to overload the
+ Note that when you write your own widget you need to override the
DoGetBestSize() function instead of this (non-virtual!) function.
@see CacheBestSize(), @ref overview_windowsizing
@see @ref overview_windowsizing
*/
- virtual void SetClientSize(int width, int height);
+ void SetClientSize(int width, int height);
/**
@overload
*/
- virtual void SetClientSize(const wxSize& size);
+ void SetClientSize(const wxSize& size);
/**
This normally does not need to be called by user code.
@see Move(), @ref overview_windowsizing
*/
- virtual void SetSize(const wxRect& rect);
+ void SetSize(const wxRect& rect);
/**
@overload
*/
- virtual void SetSize(const wxSize& size);
+ void SetSize(const wxSize& size);
/**
@overload
*/
- virtual void SetSize(int width, int height);
+ void SetSize(int width, int height);
/**
Use of this function for windows which are not toplevel windows
@param direction
Specifies the direction for the centring. May be wxHORIZONTAL, wxVERTICAL
- or wxBOTH. It may also include wxCENTRE_ON_SCREEN flag
+ or wxBOTH. It may also include the wxCENTRE_ON_SCREEN flag
if you want to centre the window on the entire screen and not on its
parent window.
@see wxTopLevelWindow::CentreOnScreen
*/
void CentreOnParent(int direction = wxBOTH);
+
+ /**
+ Centres the window.
+
+ @param direction
+ Specifies the direction for the centring. May be wxHORIZONTAL,
+ wxVERTICAL or wxBOTH. It may also include the wxCENTRE_ON_SCREEN
+ flag.
+
+ @remarks This function is not meant to be called directly by user code,
+ but via Centre, Center, CentreOnParent, or CenterOnParent.
+ This function can be overriden to fine-tune centring behaviour.
+ */
+ virtual void DoCentre(int direction);
+
/**
This gets the position of the window in pixels, relative to the parent window
for the child windows or relative to the display origin for the top level windows.
//@{
/**
- Clears the window by filling it with the current background colour. Does not
- cause an erase background event to be generated.
+ Clears the window by filling it with the current background colour.
+
+ Does not cause an erase background event to be generated.
+
+ Notice that this uses wxClientDC to draw on the window and the results
+ of doing it while also drawing on wxPaintDC for this window are
+ undefined. Hence this method shouldn't be used from EVT_PAINT handlers,
+ just use wxDC::Clear() on the wxPaintDC you already use there instead.
*/
virtual void ClearBackground();
*/
bool ProcessWindowEvent(wxEvent& event);
+ /**
+ Wrapper for wxEvtHandler::ProcessEventLocally().
+
+ This method is similar to ProcessWindowEvent() but can be used to
+ search for the event handler only in this window and any event handlers
+ pushed on top of it. Unlike ProcessWindowEvent() it won't propagate the
+ event upwards. But it will use the validator and event handlers
+ associated with this window, if any.
+
+ @since 2.9.1
+ */
+ bool ProcessWindowEventLocally(wxEvent& event);
+
/**
Removes and returns the top-most event handler on the event handler stack.
/**
Raises the window to the top of the window hierarchy (Z-order).
+ Notice that this function only requests the window manager to raise
+ this window to the top of Z-order. Depending on its configuration, the
+ window manager may raise the window, not do it at all or indicate that
+ a window requested to be raised in some other way, e.g. by flashing its
+ icon if it is minimized.
+
@remarks
This function only works for wxTopLevelWindow-derived classes.
The search is recursive in both cases.
@see FindWindow()
+
+ @return Window with the given @a id or @NULL if not found.
*/
static wxWindow* FindWindowById(long id, const wxWindow* parent = 0);
The search is recursive in both cases.
@see FindWindow()
+
+ @return Window with the given @a label or @NULL if not found.
*/
static wxWindow* FindWindowByLabel(const wxString& label,
const wxWindow* parent = 0);
FindWindowByLabel() is called.
@see FindWindow()
+
+ @return Window with the given @a name or @NULL if not found.
*/
static wxWindow* FindWindowByName(const wxString& name,
const wxWindow* parent = 0);