+
+ // 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);
+
+ // For implementation purposes - sometimes decorations make the client area
+ // smaller
+ virtual wxPoint GetClientAreaOrigin() const;
+
+protected:
+ // event handlers (not virtual by design)
+ void OnIdle(wxIdleEvent& event);
+
+ wxWindow *GetChild(int number) const
+ { return GetChildren().Item(number)->GetData(); }
+
+ // Responds to colour changes: passes event on to children.
+ void OnSysColourChanged(wxSysColourChangedEvent& event);
+
+ // Motif-specific
+
+ // CanvasXXXSiize functions
+ 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);
+
+ void SetMainWidget(WXWidget w) { m_mainWidget = w; }
+
+ bool CanAddEventHandler() const { return m_canAddEventHandler; }
+ void SetCanAddEventHandler(bool flag) { m_canAddEventHandler = flag; }