+
+ // Get the unique identifier of a window
+ virtual WXWidget GetHandle() const { return GetMainWidget(); }
+
+ // implementation from now on
+ // --------------------------
+
+ // accessors
+ // ---------
+
+ // 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;
+ // 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;
+
+ // Get the underlying X window and display
+ WXWindow GetXWindow() const;
+ WXDisplay *GetXDisplay() const;
+
+ // called from Motif callbacks - and should only be called from there
+
+ void SetButton1(bool pressed) { m_button1Pressed = pressed; }
+ void SetButton2(bool pressed) { m_button2Pressed = pressed; }
+ void SetButton3(bool pressed) { m_button3Pressed = pressed; }
+
+ void SetLastClick(int button, long timestamp)
+ { m_lastButton = button; m_lastTS = timestamp; }
+
+ int GetLastClickedButton() const { return m_lastButton; }
+ long GetLastClickTime() const { return m_lastTS; }
+
+ // Gives window a chance to do something in response to a size message, e.g.
+ // arrange status bar, toolbar etc.
+ virtual bool PreResize();
+
+ // Generates a paint event
+ virtual void DoPaint();
+
+ // update rectangle/region manipulation
+ // (for wxWindowDC and Motif callbacks only)
+ // -----------------------------------------
+
+ // read/write access to the update rect list
+ const wxRectList& GetUpdateRects() const { return m_updateRects; }
+
+ // Adds a recangle to the updates list
+ void AddUpdateRect(int x, int y, int w, int h)
+ { m_updateRects.Append(new wxRect(x, y, w, h)); }
+
+ // Empties the m_updateRects list
+ void ClearUpdateRects();
+
+ void ClearUpdateRegion() { m_updateRegion.Clear(); }
+ void SetUpdateRegion(const wxRegion& region) { m_updateRegion = region; }
+
+ // sets the fore/background colour for the given widget
+ static void DoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour);
+ static void DoChangeBackgroundColour(WXWidget widget, wxColour& backgroundColour, bool changeArmColour = FALSE);
+