// smaller
virtual wxPoint GetClientAreaOrigin() const;
- // Makes an adjustment to the window position (for example, a frame that has
- // a toolbar that it manages itself).
- virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
-
// Windows subclassing
void SubclassWin(WXHWND hWnd);
void UnsubclassWin();
// smaller
virtual wxPoint GetClientAreaOrigin(void) const;
- // Makes an adjustment to the window position (for example, a frame that has
- // a toolbar that it manages itself).
- virtual void AdjustForParentClientOrigin( int& rX
- ,int& rY
- ,int nSizeFlags
- );
-
// Windows subclassing
void SubclassWin(WXHWND hWnd);
void UnsubclassWin(void);
virtual void DoSetClientData( void *data );
virtual void *DoGetClientData() const;
+
+ // Makes an adjustment to the window position (for example, a frame that has
+ // a toolbar that it manages itself).
+ virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
// what kind of data do we have?
wxClientDataType m_clientDataType;
GetClientSize(w, h);
}
+void wxWindowBase::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags)
+{
+ // don't do it for the dialogs/frames - they float independently of their
+ // parent
+ if ( !IsTopLevel() )
+ {
+ wxWindow *parent = GetParent();
+ if ( !(sizeFlags & wxSIZE_NO_ADJUSTMENTS) && parent )
+ {
+ wxPoint pt(parent->GetClientAreaOrigin());
+ x += pt.x;
+ y += pt.y;
+ }
+ }
+}
+
+
void wxWindowBase::GetPositionConstraint(int *x, int *y) const
{
wxLayoutConstraints *constr = GetConstraints();
if (m_resizing) return; /* I don't like recursions */
m_resizing = TRUE;
+ if (x == -1)
+ x = m_x;
+ if (y == -1)
+ y = m_y;
+ AdjustForParentClientOrigin(x, y, sizeFlags);
+
if (m_parent->m_wxwindow == NULL) /* i.e. wxNotebook */
{
/* don't set the size for children of wxNotebook, just take the values. */
if (m_resizing) return; /* I don't like recursions */
m_resizing = TRUE;
+ if (x == -1)
+ x = m_x;
+ if (y == -1)
+ y = m_y;
+ AdjustForParentClientOrigin(x, y, sizeFlags);
+
if (m_parent->m_wxwindow == NULL) /* i.e. wxNotebook */
{
/* don't set the size for children of wxNotebook, just take the values. */
wxWindowMGL *win = (wxWindowMGL*)MGL_wmGetWindowUserData(wnd);
wxPoint where = win->ScreenToClient(wxPoint(e->where_x, e->where_y));
+ if ( !win->IsEnabled() ) return FALSE;
+
wxEventType type = wxEVT_NULL;
wxMouseEvent event;
event.SetEventObject(win);
{
wxEventType type = wxEVT_NULL;
wxWindowMGL *win = (wxWindowMGL*)MGL_wmGetWindowUserData(wnd);
+
+ if ( !win->IsEnabled() ) return FALSE;
+
wxPoint where = win->ScreenToClient(wxPoint(e->where_x, e->where_y));
wxKeyEvent event;
if ( y == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE) )
y = currentY;
-#if 0 // FIXME_MGL -- what's this good for?
AdjustForParentClientOrigin(x, y, sizeFlags);
-#endif
wxSize size(-1, -1);
if ( width == -1 )
return wxPoint(0, 0);
}
-// Makes an adjustment to the window position (for example, a frame that has
-// a toolbar that it manages itself).
-void wxWindowMSW::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags)
-{
- // don't do it for the dialogs/frames - they float independently of their
- // parent
- if ( !IsTopLevel() )
- {
- wxWindow *parent = GetParent();
- if ( !(sizeFlags & wxSIZE_NO_ADJUSTMENTS) && parent )
- {
- wxPoint pt(parent->GetClientAreaOrigin());
- x += pt.x;
- y += pt.y;
- }
- }
-}
-
// ---------------------------------------------------------------------------
// text metrics
// ---------------------------------------------------------------------------
return wxPoint(0, 0);
} // end of wxWindowOS2::GetClientAreaOrigin
-void wxWindowOS2::AdjustForParentClientOrigin(
- int& rX
-, int& rY
-, int nSizeFlags
-)
-{
- //
- // Don't do it for the dialogs/frames - they float independently of their
- // parent
- //
- if (!IsTopLevel())
- {
- wxWindow* pParent = GetParent();
-
- if (!(nSizeFlags & wxSIZE_NO_ADJUSTMENTS) && pParent)
- {
- wxPoint vPoint(pParent->GetClientAreaOrigin());
- rX += vPoint.x;
- rY += vPoint.y;
- }
- }
-} // end of wxWindowOS2::AdjustForParentClientOrigin
-
// ---------------------------------------------------------------------------
// text metrics
// ---------------------------------------------------------------------------