#ifndef _WX_WINDOW_H_BASE_
#define _WX_WINDOW_H_BASE_
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "windowbase.h"
#endif
virtual wxWindow *SetDefaultItem(wxWindow * WXUNUSED(child))
{ return NULL; }
+ // set this child as temporary default
+ virtual void SetTmpDefaultItem(wxWindow * WXUNUSED(win)) { }
+
// parent/children relations
// -------------------------
// was changed, FALSE otherwise (error or newParent == oldParent)
virtual bool Reparent( wxWindowBase *newParent );
+ // implementation mostly
+ virtual void AddChild( wxWindowBase *child );
+ virtual void RemoveChild( wxWindowBase *child );
+
+ // looking for windows
+ // -------------------
+
// find window among the descendants of this one either by id or by
// name (return NULL if not found)
wxWindow *FindWindow( long id );
wxWindow *FindWindow( const wxString& name );
- // implementation mostly
- virtual void AddChild( wxWindowBase *child );
- virtual void RemoveChild( wxWindowBase *child );
+ // Find a window among any window (all return NULL if not found)
+ static wxWindow *FindWindowById( long id, const wxWindow *parent = NULL );
+ static wxWindow *FindWindowByName( const wxString& name,
+ const wxWindow *parent = NULL );
+ static wxWindow *FindWindowByLabel( const wxString& label,
+ const wxWindow *parent = NULL );
// event handler stuff
// -------------------
#endif // wxUSE_PALETTE
protected:
+#if wxUSE_CONSTRAINTS
+ // satisfy the constraints for the windows but don't set the window sizes
+ void SatisfyConstraints();
+#endif // wxUSE_CONSTRAINTS
// the window id - a number which uniquely identifies a window among
// its siblings unless it is -1
// the minimal allowed size for the window (no minimal size if variable(s)
// contain(s) -1)
- int m_minWidth, m_minHeight, m_maxWidth, m_maxHeight;
+ int m_minWidth,
+ m_minHeight,
+ m_maxWidth,
+ m_maxHeight;
// event handler for this window: usually is just 'this' but may be
// changed with SetEventHandler()