wxWindow Class Reference
[Miscellaneous Windows]

#include <wx/window.h>

Inheritance diagram for wxWindow:

wxEvtHandler wxObject wxControl wxFileCtrl wxGLCanvas wxHtmlHelpWindow wxMDIClientWindow wxMenuBar wxPanel wxPGMultiButton wxSashWindow wxSplitterWindow wxStatusBar wxTipWindow wxTopLevelWindow

List of all members.


Detailed Description

wxWindow is the base class for all windows and represents any visible object om screen. All controls, top level windows and so on are windows. Sizers and device contexts are not, however, as they don't appear on screen themselves.

Please note that all children of the window will be deleted automatically by the destructor before the window itself is deleted which means that you don't have to worry about deleting them manually. Please see the window deletion overview for more information.

Also note that in this, and many others, wxWidgets classes some GetXXX() methods may be overloaded (as, for example, wxWindow::GetSize or wxWindow::GetClientSize). In this case, the overloads 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 English, this means that the derived class has to override all overloaded variants if it overrides any of them). To allow overriding them in the derived class, wxWidgets uses a unique protected virtual DoGetXXX() method and all GetXXX() ones are forwarded to it, so overriding the former changes the behaviour of the latter.

Styles:

Extra styles:
Library:  wxCore

Category:  Miscellaneous Windows

See also:
Event handling overview, Window sizing overview

Public Member Functions

 wxWindow ()
 wxWindow (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxPanelNameStr)
virtual ~wxWindow ()
virtual bool AcceptsFocus () const
virtual bool AcceptsFocusFromKeyboard () const
virtual bool AcceptsFocusRecursively () const
virtual void AddChild (wxWindow *child)
virtual void AlwaysShowScrollbars (bool hflag=true, bool vflag=true)
void CacheBestSize (const wxSize &size) const
virtual bool CanSetTransparent ()
void CaptureMouse ()
void Center (int dir=wxBOTH)
void CenterOnParent (int dir=wxBOTH)
void Centre (int direction=wxBOTH)
void CentreOnParent (int direction=wxBOTH)
virtual void ClearBackground ()
void ClientToScreen (int *x, int *y) const
wxPoint ClientToScreen (const wxPoint &pt) const
virtual wxSize ClientToWindowSize (const wxSize &size) const
virtual wxSize WindowToClientSize (const wxSize &size) const
bool Close (bool force=false)
virtual bool Destroy ()
bool DestroyChildren ()
bool IsBeingDeleted () const
bool Disable ()
virtual void DoUpdateWindowUI (wxUpdateUIEvent &event)
virtual void DragAcceptFiles (bool accept)
virtual bool Enable (bool enable=true)
wxWindowFindWindow (long id) const
wxWindowFindWindow (const wxString &name) const
virtual void Fit ()
virtual void FitInside ()
void Freeze ()
wxAcceleratorTableGetAcceleratorTable ()
wxAccessibleGetAccessible ()
wxSize GetAdjustedBestSize () const
wxColour GetBackgroundColour () const
virtual wxBackgroundStyle GetBackgroundStyle () const
wxSize GetBestSize () const
wxCaretGetCaret () const
virtual int GetCharHeight () const
virtual int GetCharWidth () const
wxLayoutConstraints * GetConstraints () const
wxSizerGetContainingSizer () const
const wxCursorGetCursor () const
virtual wxVisualAttributes GetDefaultAttributes () const
virtual wxDropTargetGetDropTarget () const
wxSize GetEffectiveMinSize () const
wxEvtHandlerGetEventHandler () const
long GetExtraStyle () const
wxFont GetFont () const
wxColour GetForegroundColour () const
wxWindowGetGrandParent () const
virtual WXWidget GetHandle () const
wxString GetHelpText () const
virtual wxString GetHelpTextAtPoint (const wxPoint point, wxHelpEvent::Origin origin) const
wxWindowID GetId () const
virtual wxString GetLabel () const
virtual wxSize GetMaxClientSize () const
virtual wxSize GetMaxSize () const
virtual wxSize GetMinClientSize () const
virtual wxSize GetMinSize () const
virtual wxString GetName () const
wxWindowGetNextSibling () const
wxWindowGetParent () const
int GetPopupMenuSelectionFromUser (wxMenu &menu, const wxPoint &pos)
int GetPopupMenuSelectionFromUser (wxMenu &menu, int x, int y)
void GetPosition (int *x, int *y) const
wxPoint GetPosition () const
wxWindowGetPrevSibling () const
wxRect GetRect () const
void GetScreenPosition (int *x, int *y) const
wxPoint GetScreenPosition () const
wxRect GetScreenRect () const
virtual int GetScrollPos (int orientation) const
virtual int GetScrollRange (int orientation) const
virtual int GetScrollThumb (int orientation) const
void GetSize (int *width, int *height) const
wxSize GetSize () const
wxSizerGetSizer () const
virtual void GetTextExtent (const wxString &string, int *w, int *h, int *descent=NULL, int *externalLeading=NULL, const wxFont *font=NULL) const
wxSize GetTextExtent (const wxString &string) const
wxToolTipGetToolTip () const
const wxRegionGetUpdateRegion () const
virtual wxValidatorGetValidator ()
virtual wxSize GetWindowBorderSize () const
virtual long GetWindowStyleFlag () const
wxWindowVariant GetWindowVariant () const
bool HandleAsNavigationKey (const wxKeyEvent &event)
bool HandleWindowEvent (wxEvent &event) const
virtual bool HasCapture () const
bool HasExtraStyle (int exFlag) const
bool HasFlag (int flag) const
virtual bool HasFocus () const
virtual bool HasMultiplePages () const
bool HasScrollbar (int orient) const
virtual bool HasTransparentBackground ()
bool Hide ()
virtual bool HideWithEffect (wxShowEffect effect, unsigned int timeout=0)
virtual void InheritAttributes ()
virtual void InitDialog ()
void InvalidateBestSize ()
virtual bool IsDoubleBuffered () const
bool IsEnabled () const
bool IsFrozen () const
virtual bool IsRetained () const
virtual bool IsScrollbarAlwaysShown (int orient) const
virtual bool IsShown () const
virtual bool IsShownOnScreen () const
bool IsThisEnabled () const
virtual bool IsTopLevel () const
virtual bool Layout ()
virtual void Lower ()
virtual void MakeModal (bool modal=true)
void Move (int x, int y, int flags=wxSIZE_USE_EXISTING)
void Move (const wxPoint &pt, int flags=wxSIZE_USE_EXISTING)
void MoveAfterInTabOrder (wxWindow *win)
void MoveBeforeInTabOrder (wxWindow *win)
bool Navigate (int flags=IsForward)
bool NavigateIn (int flags=IsForward)
virtual void OnInternalIdle ()
bool LineUp ()
bool LineDown ()
bool PageUp ()
bool PageDown ()
wxEvtHandlerPopEventHandler (bool deleteHandler=false)
void PostSizeEvent ()
void PostSizeEventToParent ()
void PushEventHandler (wxEvtHandler *handler)
virtual void Raise ()
virtual void Refresh (bool eraseBackground=true, const wxRect *rect=NULL)
void RefreshRect (const wxRect &rect, bool eraseBackground=true)
bool RegisterHotKey (int hotkeyId, int modifiers, int virtualKeyCode)
void ReleaseMouse ()
virtual void RemoveChild (wxWindow *child)
bool RemoveEventHandler (wxEvtHandler *handler)
virtual bool Reparent (wxWindow *newParent)
virtual void ScreenToClient (int *x, int *y) const
virtual wxPoint ScreenToClient (const wxPoint &pt) const
virtual bool ScrollLines (int lines)
virtual bool ScrollPages (int pages)
virtual void ScrollWindow (int dx, int dy, const wxRect *rect=NULL)
virtual void SendSizeEvent (int flags=0)
void SendSizeEventToParent (int flags=0)
virtual void SetAcceleratorTable (const wxAcceleratorTable &accel)
void SetAccessible (wxAccessible *accessible)
void SetAutoLayout (bool autoLayout)
virtual bool SetBackgroundColour (const wxColour &colour)
virtual bool SetBackgroundStyle (wxBackgroundStyle style)
virtual void SetCanFocus (bool canFocus)
void SetCaret (wxCaret *caret)
void SetConstraints (wxLayoutConstraints *constraints)
void SetContainingSizer (wxSizer *sizer)
virtual bool SetCursor (const wxCursor &cursor)
virtual void SetDropTarget (wxDropTarget *target)
void SetEventHandler (wxEvtHandler *handler)
virtual void SetExtraStyle (long exStyle)
virtual void SetFocus ()
virtual void SetFocusFromKbd ()
virtual bool SetFont (const wxFont &font)
virtual bool SetForegroundColour (const wxColour &colour)
void SetHelpText (const wxString &helpText)
void SetId (wxWindowID winid)
void SetInitialSize (const wxSize &size=wxDefaultSize)
virtual void SetLabel (const wxString &label)
virtual void SetMaxClientSize (const wxSize &size)
virtual void SetMaxSize (const wxSize &size)
virtual void SetMinClientSize (const wxSize &size)
virtual void SetMinSize (const wxSize &size)
virtual void SetName (const wxString &name)
void SetOwnBackgroundColour (const wxColour &colour)
void SetOwnFont (const wxFont &font)
void SetOwnForegroundColour (const wxColour &colour)
void SetPalette (const wxPalette &pal)
virtual void SetScrollPos (int orientation, int pos, bool refresh=true)
virtual void SetScrollbar (int orientation, int position, int thumbSize, int range, bool refresh=true)
void SetSize (int x, int y, int width, int height, int sizeFlags=wxSIZE_AUTO)
void SetSizer (wxSizer *sizer, bool deleteOld=true)
void SetSizerAndFit (wxSizer *sizer, bool deleteOld=true)
virtual void SetThemeEnabled (bool enable)
virtual bool SetTransparent (wxByte alpha)
virtual void SetValidator (const wxValidator &validator)
void SetWindowStyle (long style)
virtual void SetWindowStyleFlag (long style)
void SetWindowVariant (wxWindowVariant variant)
virtual bool ShouldInheritColours () const
virtual bool Show (bool show=true)
virtual bool ShowWithEffect (wxShowEffect effect, unsigned int timeout=0)
void Thaw ()
bool ToggleWindowStyle (int flag)
virtual bool TransferDataFromWindow ()
virtual bool TransferDataToWindow ()
bool UnregisterHotKey (int hotkeyId)
void UnsetToolTip ()
virtual void Update ()
virtual void UpdateWindowUI (long flags=wxUPDATE_UI_NONE)
virtual bool Validate ()
virtual void WarpPointer (int x, int y)
wxPoint ConvertDialogToPixels (const wxPoint &pt)
wxSize ConvertDialogToPixels (const wxSize &sz)
wxPoint ConvertPixelsToDialog (const wxPoint &pt)
wxSize ConvertPixelsToDialog (const wxSize &sz)
wxWindowList & GetChildren ()
const wxWindowList & GetChildren () const
void GetClientSize (int *width, int *height) const
wxSize GetClientSize () const
wxSize GetVirtualSize () const
void GetVirtualSize (int *width, int *height) const
bool IsExposed (int x, int y) const
const bool IsExposed (wxPoint amp;pt) const
const bool IsExposed (int x, int y, int w, int h) const
const bool IsExposed (wxRect amp;rect) const
bool PopupMenu (wxMenu *menu, const wxPoint &pos=wxDefaultPosition)
bool PopupMenu (wxMenu *menu, int x, int y)
virtual void SetClientSize (int width, int height)
virtual void SetClientSize (const wxSize &size)
virtual void SetSize (const wxRect &rect)
virtual void SetSize (const wxSize &size)
virtual void SetSize (int width, int height)
void SetToolTip (const wxString &tip)
void SetToolTip (wxToolTip *tip)
void SetVirtualSize (int width, int height)
void SetVirtualSize (const wxSize &size)

Static Public Member Functions

static wxWindowFindFocus ()
static wxWindowFindWindowById (long id, wxWindow *parent=NULL)
static wxWindowFindWindowByLabel (const wxString &label, wxWindow *parent=NULL)
static wxWindowFindWindowByName (const wxString &name, wxWindow *parent=NULL)
static wxWindowGetCapture ()
static wxVisualAttributes GetClassDefaultAttributes (wxWindowVariant variant=wxWINDOW_VARIANT_NORMAL)
static wxWindowID NewControlId (int count=1)
static void UnreserveControlId (wxWindowID id, int count=1)

Protected Member Functions

virtual wxSize DoGetBestSize () const
virtual void SetInitialBestSize (const wxSize &size)

Constructor & Destructor Documentation

wxWindow::wxWindow (  ) 

Default constructor

wxWindow::wxWindow ( wxWindow parent,
wxWindowID  id,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
long  style = 0,
const wxString name = wxPanelNameStr 
)

Constructs a window, which can be a child of a frame, dialog or any other non-control window.

Parameters:
parent Pointer to a parent window.
id Window identifier. If wxID_ANY, will automatically create an identifier.
pos Window position. wxDefaultPosition indicates that wxWidgets should generate a default position for the window. If using the wxWindow class directly, supply an actual position.
size Window size. wxDefaultSize indicates that wxWidgets should generate a default size for the window. If no suitable size can be found, the window will be sized to 20x20 pixels so that the window is visible but obviously not correctly sized.
style Window style. For generic window styles, please see wxWindow.
name Window name.

virtual wxWindow::~wxWindow (  )  [virtual]

Destructor.

Deletes all sub-windows, then deletes itself. Instead of using the delete operator explicitly, you should normally use Destroy() so that wxWidgets can delete a window only when it is safe to do so, in idle time.

See also:
Window Deletion Overview, Destroy(), wxCloseEvent


Member Function Documentation

virtual bool wxWindow::AcceptsFocus (  )  const [virtual]

This method may be overridden in the derived classes to return false to indicate that this control doesn't accept input at all (i.e. behaves like e.g. wxStaticText) and so doesn't need focus.

See also:
AcceptsFocusFromKeyboard()

Reimplemented in wxPanel.

virtual bool wxWindow::AcceptsFocusFromKeyboard (  )  const [virtual]

This method may be overridden in the derived classes to return false to indicate that while this control can, in principle, have focus if the user clicks it with the mouse, it shouldn't be included in the TAB traversal chain when using the keyboard.

virtual bool wxWindow::AcceptsFocusRecursively (  )  const [virtual]

Overridden to indicate wehter this window or one of its children accepts focus. Usually it's the same as AcceptsFocus() but is overridden for container windows.

virtual void wxWindow::AddChild ( wxWindow child  )  [virtual]

Adds a child window. This is called automatically by window creation functions so should not be required by the application programmer. Notice that this function is mostly internal to wxWidgets and shouldn't be called by the user code.

Parameters:
child Child window to add.

virtual void wxWindow::AlwaysShowScrollbars ( bool  hflag = true,
bool  vflag = true 
) [virtual]

Call this function to force one or both scrollbars to be always shown, even if the window is big enough to show its entire contents without scrolling.

Since:
2.9.0
Parameters:
hflag Whether the horizontal scroll bar should always be visible.
vflag Whether the vertical scroll bar should always be visible.
Remarks:
This function is currently only implemented under Mac/Carbon.

void wxWindow::CacheBestSize ( const wxSize size  )  const

Sets the cached best size value.

virtual bool wxWindow::CanSetTransparent (  )  [virtual]

Returns true if the system supports transparent windows and calling SetTransparent() may succeed. If this function returns false, transparent windows are definitely not supported by the current system.

Reimplemented in wxTopLevelWindow.

void wxWindow::CaptureMouse (  ) 

Directs all mouse input to this window. Call ReleaseMouse() to release the capture.

Note that wxWidgets maintains the stack of windows having captured the mouse and when the mouse is released the capture returns to the window which had had captured it previously and it is only really released if there were no previous window. In particular, this means that you must release the mouse as many times as you capture it, unless the window receives the wxMouseCaptureLostEvent event.

Any application which captures the mouse in the beginning of some operation must handle wxMouseCaptureLostEvent and cancel this operation when it receives the event. The event handler must not recapture mouse.

See also:
ReleaseMouse(), wxMouseCaptureLostEvent

void wxWindow::Center ( int  dir = wxBOTH  ) 

A synonym for Centre().

void wxWindow::CenterOnParent ( int  dir = wxBOTH  ) 

A synonym for CentreOnParent().

void wxWindow::Centre ( int  direction = wxBOTH  ) 

Centres the window.

Parameters:
direction Specifies the direction for the centering. May be wxHORIZONTAL, wxVERTICAL or wxBOTH. It may also include wxCENTRE_ON_SCREEN flag if you want to center the window on the entire screen and not on its parent window.
Remarks:
If the window is a top level one (i.e. doesn't have a parent), it will be centered relative to the screen anyhow.
See also:
Center()

Reimplemented in wxDialog, and wxFrame.

void wxWindow::CentreOnParent ( int  direction = wxBOTH  ) 

Centres the window on its parent. This is a more readable synonym for Centre().

Parameters:
direction Specifies the direction for the centering. May be wxHORIZONTAL, wxVERTICAL or wxBOTH.
Remarks:
This methods provides for a way to center top level windows over their parents instead of the entire screen. If there is no parent or if the window is not a top level window, then behaviour is the same as Centre().
See also:
wxTopLevelWindow::CentreOnScreen

virtual void wxWindow::ClearBackground (  )  [virtual]

Clears the window by filling it with the current background colour. Does not cause an erase background event to be generated.

void wxWindow::ClientToScreen ( int *  x,
int *  y 
) const

Converts to screen coordinates from coordinates relative to this window.

Parameters:
x A pointer to a integer value for the x coordinate. Pass the client coordinate in, and a screen coordinate will be passed out.
y A pointer to a integer value for the y coordinate. Pass the client coordinate in, and a screen coordinate will be passed out.
wxPython Note: In place of a single overloaded method name, wxPython implements the following methods:
  • ClientToScreen(point): Accepts and returns a wxPoint
  • ClientToScreenXY(x, y): Returns a 2-tuple, (x, y)

wxPoint wxWindow::ClientToScreen ( const wxPoint pt  )  const

Converts to screen coordinates from coordinates relative to this window.

Parameters:
pt The client position for the second form of the function.

virtual wxSize wxWindow::ClientToWindowSize ( const wxSize size  )  const [virtual]

Converts client area size size to corresponding window size.

In other words, the returned value is what would GetSize() return if this window had client area of given size. Components with wxDefaultCoord value are left unchanged. Note that the conversion is not always exact, it assumes that non-client area doesn't change and so doesn't take into account things like menu bar (un)wrapping or (dis)appearance of the scrollbars.

Since:
2.8.8
See also:
WindowToClientSize()

virtual wxSize wxWindow::WindowToClientSize ( const wxSize size  )  const [virtual]

Converts window size size to corresponding client area size In other words, the returned value is what would GetClientSize() return if this window had given window size. Components with wxDefaultCoord value are left unchanged.

Note that the conversion is not always exact, it assumes that non-client area doesn't change and so doesn't take into account things like menu bar (un)wrapping or (dis)appearance of the scrollbars.

Since:
2.8.8
See also:
ClientToWindowSize()

bool wxWindow::Close ( bool  force = false  ) 

This function simply generates a wxCloseEvent whose handler usually tries to close the window. It doesn't close the window itself, however.

Parameters:
force false if the window's close handler should be able to veto the destruction of this window, true if it cannot.
Remarks:
Close calls the close handler for the window, providing an opportunity for the window to choose whether to destroy the window. Usually it is only used with the top level windows (wxFrame and wxDialog classes) as the others are not supposed to have any special OnClose() logic. The close handler should check whether the window is being deleted forcibly, using wxCloseEvent::CanVeto, in which case it should destroy the window using wxWindow::Destroy. Note that calling Close does not guarantee that the window will be destroyed; but it provides a way to simulate a manual close of a window, which may or may not be implemented by destroying the window. The default implementation of wxDialog::OnCloseWindow does not necessarily delete the 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. To guarantee that the window will be destroyed, call wxWindow::Destroy instead
See also:
Window Deletion Overview, Destroy(), wxCloseEvent

wxPoint wxWindow::ConvertDialogToPixels ( const wxPoint pt  ) 

Converts a point or size from dialog units to pixels.

For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8.

Remarks:
Dialog units are used for maintaining a dialog's proportions even if the font changes. You can also use these functions programmatically. A convenience macro is defined:
                #define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)
See also:
ConvertPixelsToDialog()

wxSize wxWindow::ConvertDialogToPixels ( const wxSize sz  ) 

Converts a point or size from dialog units to pixels.

For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8.

Remarks:
Dialog units are used for maintaining a dialog's proportions even if the font changes. You can also use these functions programmatically. A convenience macro is defined:
                #define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)
See also:
ConvertPixelsToDialog()

wxPoint wxWindow::ConvertPixelsToDialog ( const wxPoint pt  ) 

Converts a point or size from pixels to dialog units.

For the x dimension, the pixels are multiplied by 4 and then divided by the average character width. For the y dimension, the pixels are multiplied by 8 and then divided by the average character height.

Remarks:
Dialog units are used for maintaining a dialog's proportions even if the font changes.
See also:
ConvertDialogToPixels()

wxSize wxWindow::ConvertPixelsToDialog ( const wxSize sz  ) 

Converts a point or size from pixels to dialog units.

For the x dimension, the pixels are multiplied by 4 and then divided by the average character width. For the y dimension, the pixels are multiplied by 8 and then divided by the average character height.

Remarks:
Dialog units are used for maintaining a dialog's proportions even if the font changes.
See also:
ConvertDialogToPixels()

virtual bool wxWindow::Destroy (  )  [virtual]

Destroys the window safely. Use this function instead of the delete operator, since different window classes can be destroyed differently. Frames and dialogs are not destroyed immediately when this function is called -- they are added to a list of windows to be deleted on idle time, when all the window's events have been processed. This prevents problems with events being sent to non-existent windows.

Returns:
true if the window has either been successfully deleted, or it has been added to the list of windows pending real deletion.

bool wxWindow::DestroyChildren (  ) 

Destroys all children of a window. Called automatically by the destructor.

bool wxWindow::IsBeingDeleted (  )  const

Returns true if this window is in process of being destroyed.

The top level windows are not deleted immediately but are rather scheduled for later destruction to give them time to process any pending messages, see Destroy() description.

This function returns true if this window, or one of its parent windows, is scheduled for destruction and can be useful to avoid manipulating it as it's usually useless to do something with a window which is on the point of disappearing anyhow.

bool wxWindow::Disable (  ) 

Disables the window. Same as Enable() Enable(false).

Returns:
Returns true if the window has been disabled, false if it had been already disabled before the call to this function.

virtual void wxWindow::DoUpdateWindowUI ( wxUpdateUIEvent event  )  [virtual]

Does the window-specific updating after processing the update event. This function is called by UpdateWindowUI() in order to check return values in the wxUpdateUIEvent and act appropriately. For example, to allow frame and dialog title updating, wxWidgets implements this function as follows:

        // do the window-specific processing after processing the update event
        void wxTopLevelWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
        {
            if ( event.GetSetEnabled() )
                Enable(event.GetEnabled());

            if ( event.GetSetText() )
            {
                if ( event.GetText() != GetTitle() )
                    SetTitle(event.GetText());
            }
        }

virtual void wxWindow::DragAcceptFiles ( bool  accept  )  [virtual]

Enables or disables eligibility for drop file events (OnDropFiles).

Parameters:
accept If true, the window is eligible for drop file events. If false, the window will not accept drop file events.
Remarks:
Windows only.

virtual bool wxWindow::Enable ( bool  enable = true  )  [virtual]

Enable or disable the window for user input. Note that when a parent window is disabled, all of its children are disabled as well and they are reenabled again when the parent is.

Parameters:
enable If true, enables the window for input. If false, disables the window.
Returns:
Returns true if the window has been enabled or disabled, false if nothing was done, i.e. if the window had already been in the specified state.
See also:
IsEnabled(), Disable(), wxRadioBox::Enable

static wxWindow* wxWindow::FindFocus (  )  [static]

Finds the window or control which currently has the keyboard focus.

Remarks:
Note that this is a static function, so it can be called without needing a wxWindow pointer.
See also:
SetFocus(), HasFocus()

wxWindow* wxWindow::FindWindow ( long  id  )  const

Find a child of this window, by id. May return this if it matches itself.

wxWindow* wxWindow::FindWindow ( const wxString name  )  const

Find a child of this window, by name. May return this if it matches itself.

static wxWindow* wxWindow::FindWindowById ( long  id,
wxWindow parent = NULL 
) [static]

Find the first window with the given id.

If 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. The search is recursive in both cases.

See also:
FindWindow()

static wxWindow* wxWindow::FindWindowByLabel ( const wxString label,
wxWindow parent = NULL 
) [static]

Find a window by its label.

Depending on the type of window, the label may be a window title or panel item label. If 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. The search is recursive in both cases.

See also:
FindWindow()

static wxWindow* wxWindow::FindWindowByName ( const wxString name,
wxWindow parent = NULL 
) [static]

Find a window by its name (as given in a window constructor or Create function call).

If 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.

The search is recursive in both cases. If no window with such name is found, FindWindowByLabel() is called.

See also:
FindWindow()

virtual void wxWindow::Fit