-public:
- ////////////////////////////////////////////////////////////////////////
- //// IMPLEMENTATION
-
- // For implementation purposes - sometimes decorations make the client area
- // 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);
-
- // Executes the default message
- virtual long Default();
-
-/* TODO: you may need something like this
- // Determine whether 3D effects are wanted
- virtual WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D);
-*/
-
- virtual void AddChild(wxWindow *child); // Adds reference to the child object
- virtual void RemoveChild(wxWindow *child); // Removes reference to child
- // (but doesn't delete the child object)
- virtual void DestroyChildren(); // Removes and destroys all children
-
- inline bool IsBeingDeleted() const { return FALSE; } // TODO: Should probably eliminate this
-
- // Constraint implementation
- void UnsetConstraints(wxLayoutConstraints *c);
- inline wxList *GetConstraintsInvolvedIn() const ;
- // Back-pointer to other windows we're involved with, so if we delete
- // this window, we must delete any constraints we're involved with.
- void AddConstraintReference(wxWindow *otherWin);
- void RemoveConstraintReference(wxWindow *otherWin);
- void DeleteRelatedConstraints();
-
- virtual void ResetConstraints();
- virtual void SetConstraintSizes(bool recurse = TRUE);
- virtual bool LayoutPhase1(int *noChanges);
- virtual bool LayoutPhase2(int *noChanges);
- virtual bool DoPhase(int);
- // Transforms from sizer coordinate space to actual
- // parent coordinate space
- virtual void TransformSizerToActual(int *x, int *y) const ;
-
- // Set size with transformation to actual coordinates if nec.
- virtual void SizerSetSize(int x, int y, int w, int h);
- virtual void SizerMove(int x, int y);
-
- // Only set/get the size/position of the constraint (if any)
- virtual void SetSizeConstraint(int x, int y, int w, int h);
- virtual void MoveConstraint(int x, int y);
- virtual void GetSizeConstraint(int *w, int *h) const ;
- virtual void GetClientSizeConstraint(int *w, int *h) const ;
- virtual void GetPositionConstraint(int *x, int *y) const ;
-
- // Dialog units translations. Implemented in wincmn.cpp.
- wxPoint ConvertPixelsToDialog(const wxPoint& pt) ;
- wxPoint ConvertDialogToPixels(const wxPoint& pt) ;
- inline wxSize ConvertPixelsToDialog(const wxSize& sz)
- { wxPoint pt(ConvertPixelsToDialog(wxPoint(sz.x, sz.y))); return wxSize(pt.x, pt.y); }
- inline wxSize ConvertDialogToPixels(const wxSize& sz)
- { wxPoint pt(ConvertDialogToPixels(wxPoint(sz.x, sz.y))); return wxSize(pt.x, pt.y); }
-
- wxObject *GetChild(int number) const ;
-
- // Generates a new id for controls
- static int NewControlId();
-
- // Responds to colour changes: passes event on to children.
- void OnSysColourChanged(wxSysColourChangedEvent& event);
-
- // Transfers data to any child controls
- void OnInitDialog(wxInitDialogEvent& event);
-
- // Sends an OnInitDialog event, which in turns transfers data to
- // to the window via validators.
- virtual void InitDialog();
-
- /// Motif-specific
-
- void ClearUpdateRects();
- void CanvasGetSize(int* width, int* height) const; // If have drawing area
- void CanvasGetClientSize(int *width, int *height) const;
- void CanvasGetPosition(int *x, int *y) const; // If have drawing area
- void CanvasSetClientSize(int width, int size);
- void CanvasSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
-
- // Gives window a chance to do something in response to a size
- // message, e.g. arrange status bar, toolbar etc.
- virtual bool PreResize() { return TRUE; }
-
- // Get main widget for this window, e.g. a text widget
- virtual WXWidget GetMainWidget() const;
- // Get the widget that corresponds to the label (for font setting, label setting etc.)
- virtual WXWidget GetLabelWidget() const { return GetMainWidget(); }
- // Get the client widget for this window (something we can
- // create other windows on)
- virtual WXWidget GetClientWidget() const;
- // Get the top widget for this window, e.g. the scrolled widget parent
- // of a multi-line text widget. Top means, top in the window hierarchy
- // that implements this window.
- virtual WXWidget GetTopWidget() const;
- virtual void SetMainWidget(WXWidget w) { m_mainWidget = w; }
- bool CanAddEventHandler() const { return m_canAddEventHandler; }
- void SetCanAddEventHandler(bool flag) { m_canAddEventHandler = flag; }
-
- // Get the underlying X window and display
- virtual WXWindow GetXWindow() const;
- virtual WXDisplay *GetXDisplay() const;
-
- virtual WXPixmap GetBackingPixmap() const { return m_backingPixmap; }
- inline int GetPixmapWidth() const { return m_pixmapWidth; }
- inline int GetPixmapHeight() const { return m_pixmapHeight; }
-
- // Change properties
- virtual void ChangeFont(bool keepOriginalSize = TRUE); // Change to the current font (often overridden)
- virtual void DoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour);
- virtual void DoChangeBackgroundColour(WXWidget widget, wxColour& backgroundColour, bool changeArmColour = FALSE);
- // These to be overridden as needed (may change several widgets)
- virtual void ChangeBackgroundColour(); // Change background and foreground colour using current
- // background colour setting (Motif generates
- // foreground based on background)
- virtual void ChangeForegroundColour(); // Change foreground colour using current
- // foreground colour setting
-
- // Adds the widget to the hash table and adds event handlers.
- bool AttachWidget (wxWindow* parent, WXWidget mainWidget,
- WXWidget formWidget, int x, int y, int width, int height);
- bool DetachWidget(WXWidget widget);
-
- // Generates a paint event
- virtual void DoPaint();
-
- ////////////////////////////////////////////////////////////////////////
- //// PROTECTED DATA