- wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxPanelNameStr)
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxPanelNameStr)
{
Init();
Create(parent, id, pos, size, style, name);
}
{
Init();
Create(parent, id, pos, size, style, name);
}
- wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxPanelNameStr);
-
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxPanelNameStr);
+
// implement base class pure virtuals
virtual void SetTitle( const wxString& title);
virtual wxString GetTitle() const;
// implement base class pure virtuals
virtual void SetTitle( const wxString& title);
virtual wxString GetTitle() const;
virtual bool SetBackgroundColour( const wxColour &colour );
virtual bool SetForegroundColour( const wxColour &colour );
virtual bool SetBackgroundColour( const wxColour &colour );
virtual bool SetForegroundColour( const wxColour &colour );
virtual int GetCharHeight() const;
virtual int GetCharWidth() const;
virtual void GetTextExtent(const wxString& string,
virtual int GetCharHeight() const;
virtual int GetCharWidth() const;
virtual void GetTextExtent(const wxString& string,
- int *x, int *y,
- int *descent = (int *) NULL,
- int *externalLeading = (int *) NULL,
- const wxFont *theFont = (const wxFont *) NULL)
- const;
-
+ int *x, int *y,
+ int *descent = (int *) NULL,
+ int *externalLeading = (int *) NULL,
+ const wxFont *theFont = (const wxFont *) NULL)
+ const;
+
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
virtual int GetScrollPos( int orient ) const;
virtual int GetScrollThumb( int orient ) const;
virtual int GetScrollRange( int orient ) const;
virtual void ScrollWindow( int dx, int dy,
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
virtual int GetScrollPos( int orient ) const;
virtual int GetScrollThumb( int orient ) const;
virtual int GetScrollRange( int orient ) const;
virtual void ScrollWindow( int dx, int dy,
- int maxW = -1, int maxH = -1,
- int incW = -1, int incH = -1);
+ int maxW = -1, int maxH = -1,
+ int incW = -1, int incH = -1);
// Get the unique identifier of a window
virtual WXWidget GetHandle() const { return GetMainWidget(); }
// Get the unique identifier of a window
virtual WXWidget GetHandle() const { return GetMainWidget(); }
// 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.)
// 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.)
// multi-line text widget. Top means, top in the window hierarchy that
// implements this window.
virtual WXWidget GetTopWidget() const;
// 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;
// Get the underlying X window and display
WXWindow GetXWindow() const;
WXDisplay *GetXDisplay() const;
void SetButton1(bool pressed) { m_button1Pressed = pressed; }
void SetButton2(bool pressed) { m_button2Pressed = pressed; }
void SetButton3(bool pressed) { m_button3Pressed = pressed; }
void SetButton1(bool pressed) { m_button1Pressed = pressed; }
void SetButton2(bool pressed) { m_button2Pressed = pressed; }
void SetButton3(bool pressed) { m_button3Pressed = pressed; }
int GetLastClickedButton() const { return m_lastButton; }
long GetLastClickTime() const { return m_lastTS; }
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();
// Gives window a chance to do something in response to a size message, e.g.
// arrange status bar, toolbar etc.
virtual bool PreResize();
// update rectangle/region manipulation
// (for wxWindowDC and Motif callbacks only)
// -----------------------------------------
// 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; }
// 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)
// 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)); }
-
+ { m_updateRects.Append(new wxRect(x, y, w, h)); }
+
void ClearUpdateRegion() { m_updateRegion.Clear(); }
void SetUpdateRegion(const wxRegion& region) { m_updateRegion = region; }
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);
// 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;
// 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);
// 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);
// Responds to colour changes: passes event on to children.
void OnSysColourChanged(wxSysColourChangedEvent& event);
// Responds to colour changes: passes event on to children.
void OnSysColourChanged(wxSysColourChangedEvent& event);
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 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);
bool CanAddEventHandler() const { return m_canAddEventHandler; }
void SetCanAddEventHandler(bool flag) { m_canAddEventHandler = flag; }
bool CanAddEventHandler() const { return m_canAddEventHandler; }
void SetCanAddEventHandler(bool flag) { m_canAddEventHandler = flag; }
public:
WXPixmap GetBackingPixmap() const { return m_backingPixmap; }
void SetBackingPixmap(WXPixmap pixmap) { m_backingPixmap = pixmap; }
public:
WXPixmap GetBackingPixmap() const { return m_backingPixmap; }
void SetBackingPixmap(WXPixmap pixmap) { m_backingPixmap = pixmap; }
int GetPixmapHeight() const { return m_pixmapHeight; }
void SetPixmapWidth(int w) { m_pixmapWidth = w; }
void SetPixmapHeight(int h) { m_pixmapHeight = h; }
int GetPixmapHeight() const { return m_pixmapHeight; }
void SetPixmapWidth(int w) { m_pixmapWidth = w; }
void SetPixmapHeight(int h) { m_pixmapHeight = h; }
// Change background and foreground colour using current background colour
// setting (Motif generates foreground based on background)
virtual void ChangeBackgroundColour();
// Change foreground colour using current foreground colour setting
virtual void ChangeForegroundColour();
// Change background and foreground colour using current background colour
// setting (Motif generates foreground based on background)
virtual void ChangeBackgroundColour();
// Change foreground colour using current foreground colour setting
virtual void ChangeForegroundColour();
protected:
// Adds the widget to the hash table and adds event handlers.
bool AttachWidget(wxWindow* parent, WXWidget mainWidget,
protected:
// 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);
+ WXWidget formWidget, int x, int y, int width, int height);
// How to implement accelerators. If we find a key event, translate to
// wxWindows wxKeyEvent form. Find a widget for the window. Now find a
// wxWindow for the widget. If there isn't one, go up the widget hierarchy
// How to implement accelerators. If we find a key event, translate to
// wxWindows wxKeyEvent form. Find a widget for the window. Now find a
// wxWindow for the widget. If there isn't one, go up the widget hierarchy
protected:
// unmanage and destroy an X widget f it's !NULL (passing NULL is ok)
void UnmanageAndDestroy(WXWidget widget);
protected:
// unmanage and destroy an X widget f it's !NULL (passing NULL is ok)
void UnmanageAndDestroy(WXWidget widget);
// map or unmap an X widget (passing NULL is ok), returns TRUE if widget was
// mapped/unmapped
bool MapOrUnmap(WXWidget widget, bool map);
// map or unmap an X widget (passing NULL is ok), returns TRUE if widget was
// mapped/unmapped
bool MapOrUnmap(WXWidget widget, bool map);
// create/destroy window scrollbars
void CreateScrollbar(wxOrientation orientation);
void DestroyScrollbar(wxOrientation orientation);
// create/destroy window scrollbars
void CreateScrollbar(wxOrientation orientation);
void DestroyScrollbar(wxOrientation orientation);
// For double-click detection
long m_lastTS; // last timestamp
int m_lastButton; // last pressed button
// For double-click detection
long m_lastTS; // last timestamp
int m_lastButton; // last pressed button
// implement the base class pure virtuals
virtual void DoClientToScreen( int *x, int *y ) const;
virtual void DoScreenToClient( int *x, int *y ) const;
// implement the base class pure virtuals
virtual void DoClientToScreen( int *x, int *y ) const;
virtual void DoScreenToClient( int *x, int *y ) const;
virtual void DoGetSize( int *width, int *height ) const;
virtual void DoGetClientSize( int *width, int *height ) const;
virtual void DoSetSize(int x, int y,
virtual void DoGetSize( int *width, int *height ) const;
virtual void DoGetClientSize( int *width, int *height ) const;
virtual void DoSetSize(int x, int y,
virtual void DoSetClientSize(int width, int height);
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual bool DoPopupMenu(wxMenu *menu, int x, int y);
virtual void DoSetClientSize(int width, int height);
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual bool DoPopupMenu(wxMenu *menu, int x, int y);
- wxNoOptimize() { ms_count++; }
- ~wxNoOptimize() { ms_count--; }
-
- static bool CanOptimize() { return ms_count == 0; }
-
+ wxNoOptimize() { ms_count++; }
+ ~wxNoOptimize() { ms_count--; }
+
+ static bool CanOptimize() { return ms_count == 0; }
+