GetSize() and GetClientSize() changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-02-22 11:01:13 +00:00
parent 1edddaf24c
commit bfc6fde4b1
80 changed files with 3467 additions and 3259 deletions

View File

@@ -67,22 +67,24 @@ public:
m_alignment = wxLAYOUT_TOP;
m_orientation = wxLAYOUT_HORIZONTAL;
}
// Read by the app
inline void SetRequestedLength(int length) { m_requestedLength = length; }
inline int GetRequestedLength() const { return m_requestedLength; }
inline void SetFlags(int flags) { m_flags = flags; }
inline int GetFlags() const { return m_flags; }
// Read by the app
void SetRequestedLength(int length) { m_requestedLength = length; }
int GetRequestedLength() const { return m_requestedLength; }
// Set by the app
inline void SetSize(const wxSize& size) { m_size = size; }
inline wxSize GetSize() const { return m_size; }
void SetFlags(int flags) { m_flags = flags; }
int GetFlags() const { return m_flags; }
inline void SetOrientation(wxLayoutOrientation orient) { m_orientation = orient; }
inline wxLayoutOrientation GetOrientation() const { return m_orientation; }
// Set by the app
void SetSize(const wxSize& size) { m_size = size; }
wxSize GetSize() const { return m_size; }
void SetOrientation(wxLayoutOrientation orient) { m_orientation = orient; }
wxLayoutOrientation GetOrientation() const { return m_orientation; }
void SetAlignment(wxLayoutAlignment align) { m_alignment = align; }
wxLayoutAlignment GetAlignment() const { return m_alignment; }
inline void SetAlignment(wxLayoutAlignment align) { m_alignment = align; }
inline wxLayoutAlignment GetAlignment() const { return m_alignment; }
protected:
int m_flags;
int m_requestedLength;

View File

@@ -37,30 +37,30 @@ public:
~wxTabControl(void);
virtual void OnDraw(wxDC& dc, bool lastInRow);
inline void SetLabel(const wxString& str) { m_controlLabel = str; }
inline wxString GetLabel(void) const { return m_controlLabel; }
void SetLabel(const wxString& str) { m_controlLabel = str; }
wxString GetLabel(void) const { return m_controlLabel; }
inline void SetFont(const wxFont& f) { m_labelFont = f; }
inline wxFont *GetFont(void) const { return (wxFont*) & m_labelFont; }
void SetFont(const wxFont& f) { m_labelFont = f; }
wxFont *GetFont(void) const { return (wxFont*) & m_labelFont; }
inline void SetSelected(bool sel) { m_isSelected = sel; }
inline bool IsSelected(void) const { return m_isSelected; }
void SetSelected(bool sel) { m_isSelected = sel; }
bool IsSelected(void) const { return m_isSelected; }
inline void SetPosition(int x, int y) { m_offsetX = x; m_offsetY = y; }
inline void SetSize(int x, int y) { m_width = x; m_height = y; }
void SetPosition(int x, int y) { m_offsetX = x; m_offsetY = y; }
void SetSize(int x, int y) { m_width = x; m_height = y; }
inline void SetRowPosition(int r) { m_rowPosition = r; }
inline int GetRowPosition() const { return m_rowPosition; }
inline void SetColPosition(int c) { m_colPosition = c; }
inline int GetColPosition() const { return m_colPosition; }
void SetRowPosition(int r) { m_rowPosition = r; }
int GetRowPosition() const { return m_rowPosition; }
void SetColPosition(int c) { m_colPosition = c; }
int GetColPosition() const { return m_colPosition; }
inline int GetX(void) const { return m_offsetX; }
inline int GetY(void) const { return m_offsetY; }
inline int GetWidth(void) const { return m_width; }
inline int GetHeight(void) const { return m_height; }
int GetX(void) const { return m_offsetX; }
int GetY(void) const { return m_offsetY; }
int GetWidth(void) const { return m_width; }
int GetHeight(void) const { return m_height; }
inline int GetId(void) const { return m_id; }
inline void SetId(int i) { m_id = i; }
int GetId(void) const { return m_id; }
void SetId(int i) { m_id = i; }
virtual bool HitTest(int x, int y) const ;

View File

@@ -207,7 +207,7 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
const wxValidator &validator = wxDefaultValidator,
const wxValidator &validator = wxDefaultValidator,
const wxString& name = wxTreeCtrlNameStr)
{
Create(parent, id, pos, size, style, validator, name);
@@ -219,7 +219,7 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
const wxValidator &validator = wxDefaultValidator,
const wxValidator &validator = wxDefaultValidator,
const wxString& name = wxTreeCtrlNameStr);
// accessors
@@ -409,7 +409,7 @@ public:
wxTreeItemId HitTest(const wxPoint& point)
{ int dummy; return HitTest(point, dummy); }
wxTreeItemId HitTest(const wxPoint& point, int& flags);
// start editing the item label: this (temporarily) replaces the item
// with a one line edit control. The item will be selected if it hadn't
// been before. textCtrlClass parameter allows you to create an edit

View File

@@ -37,70 +37,72 @@ extern const char *wxDialogNameStr;
class wxDialog: public wxPanel
{
DECLARE_DYNAMIC_CLASS(wxDialog)
DECLARE_DYNAMIC_CLASS(wxDialog)
public:
wxDialog();
wxDialog( wxWindow *parent, wxWindowID id,
wxDialog();
wxDialog( wxWindow *parent, wxWindowID id,
const wxString &title,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString &name = wxDialogNameStr );
bool Create( wxWindow *parent, wxWindowID id,
const wxString &title,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString &name = wxDialogNameStr );
~wxDialog();
bool Create( wxWindow *parent, wxWindowID id,
const wxString &title,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString &name = wxDialogNameStr );
~wxDialog();
void SetTitle(const wxString& title);
wxString GetTitle() const;
void SetTitle(const wxString& title);
wxString GetTitle() const;
void OnApply( wxCommandEvent &event );
void OnCancel( wxCommandEvent &event );
void OnOK( wxCommandEvent &event );
void OnPaint( wxPaintEvent& event );
void OnSize( wxSizeEvent &event );
void OnCloseWindow( wxCloseEvent& event );
/*
void OnCharHook( wxKeyEvent& event );
*/
void OnApply( wxCommandEvent &event );
void OnCancel( wxCommandEvent &event );
void OnOK( wxCommandEvent &event );
void OnPaint( wxPaintEvent& event );
void OnSize( wxSizeEvent &event );
void OnCloseWindow( wxCloseEvent& event );
/*
void OnCharHook( wxKeyEvent& event );
*/
bool Destroy();
bool Destroy();
virtual void SetSize( int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO );
virtual void SetSize( int width, int height );
virtual bool Show( bool show );
virtual int ShowModal();
virtual void EndModal( int retCode );
virtual bool IsModal() const;
void SetModal( bool modal );
virtual bool Show( bool show );
virtual int ShowModal();
virtual void EndModal( int retCode );
virtual bool IsModal() const;
void SetModal( bool modal );
virtual void InitDialog(void);
virtual void InitDialog(void);
virtual void Centre( int direction = wxHORIZONTAL );
virtual void Centre( int direction = wxHORIZONTAL );
virtual void SetIcon( const wxIcon &icon );
virtual void Iconize( bool WXUNUSED(iconize)) { }
virtual bool IsIconized() const { return FALSE; }
bool Iconized() const { return IsIconized(); }
virtual void Maximize() { }
virtual void Restore() { }
virtual void SetIcon( const wxIcon &icon );
virtual void Iconize( bool WXUNUSED(iconize)) { }
virtual bool IsIconized() const { return FALSE; }
bool Iconized() const { return IsIconized(); }
virtual void Maximize() { }
virtual void Restore() { }
// implementation
// implementation
virtual void GtkOnSize( int x, int y, int width, int height );
virtual void OnInternalIdle();
virtual void GtkOnSize( int x, int y, int width, int height );
virtual void OnInternalIdle();
bool m_modalShowing;
wxString m_title;
wxIcon m_icon;
bool m_modalShowing;
wxString m_title;
wxIcon m_icon;
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
DECLARE_EVENT_TABLE()
private:
DECLARE_EVENT_TABLE()
};
#endif // __GTKDIALOGH__

View File

@@ -46,82 +46,83 @@ extern const char *wxToolBarNameStr;
class wxFrame: public wxWindow
{
DECLARE_DYNAMIC_CLASS(wxFrame)
DECLARE_DYNAMIC_CLASS(wxFrame)
public:
wxFrame();
wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
~wxFrame();
bool Destroy();
wxFrame();
wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
~wxFrame();
bool Destroy();
virtual bool Show( bool show );
virtual void Centre( int direction = wxHORIZONTAL );
virtual bool Show( bool show );
virtual void Centre( int direction = wxHORIZONTAL );
virtual void GetClientSize( int *width, int *height ) const;
virtual void GetClientSize( int *width, int *height ) const;
wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
const wxString& name = "statusBar");
virtual wxStatusBar *OnCreateStatusBar( int number, long style, wxWindowID id,
const wxString& name );
virtual wxStatusBar *GetStatusBar() const;
inline void SetStatusBar(wxStatusBar *statusBar) { m_frameStatusBar = statusBar; }
virtual void SetStatusText( const wxString &text, int number = 0 );
virtual void SetStatusWidths( int n, const int widths_field[] );
virtual void SetClientSize( int width, int height );
virtual wxToolBar* CreateToolBar( long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1,
const wxString& name = wxToolBarNameStr);
virtual wxToolBar *OnCreateToolBar( long style, wxWindowID id, const wxString& name );
virtual wxToolBar *GetToolBar() const;
inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
virtual void SetSize( int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO );
virtual void SetSize( int width, int height );
virtual void SetMenuBar( wxMenuBar *menuBar );
virtual wxMenuBar *GetMenuBar() const;
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
const wxString& name = "statusBar");
virtual wxStatusBar *OnCreateStatusBar( int number, long style, wxWindowID id,
const wxString& name );
virtual wxStatusBar *GetStatusBar() const;
inline void SetStatusBar(wxStatusBar *statusBar) { m_frameStatusBar = statusBar; }
virtual void SetStatusText( const wxString &text, int number = 0 );
virtual void SetStatusWidths( int n, const int widths_field[] );
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const { return m_title; }
virtual wxToolBar* CreateToolBar( long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1,
const wxString& name = wxToolBarNameStr);
virtual wxToolBar *OnCreateToolBar( long style, wxWindowID id, const wxString& name );
virtual wxToolBar *GetToolBar() const;
inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
virtual void SetIcon( const wxIcon &icon );
virtual void Iconize( bool WXUNUSED(iconize)) { }
virtual bool IsIconized() const { return FALSE; }
bool Iconized() const { return IsIconized(); }
virtual void Maximize(bool WXUNUSED(maximize)) {}
virtual void Restore() {}
virtual void SetMenuBar( wxMenuBar *menuBar );
virtual wxMenuBar *GetMenuBar() const;
void OnCloseWindow( wxCloseEvent& event );
void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp
void OnSize( wxSizeEvent &event );
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const { return m_title; }
void OnMenuHighlight( wxMenuEvent& event );
virtual void SetIcon( const wxIcon &icon );
virtual void Iconize( bool WXUNUSED(iconize)) { }
virtual bool IsIconized() const { return FALSE; }
bool Iconized() const { return IsIconized(); }
virtual void Maximize(bool WXUNUSED(maximize)) {}
virtual void Restore() {}
// implementation
void OnCloseWindow( wxCloseEvent& event );
void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp
void OnSize( wxSizeEvent &event );
virtual void GtkOnSize( int x, int y, int width, int height );
virtual wxPoint GetClientAreaOrigin() const;
void DoMenuUpdates();
void DoMenuUpdates(wxMenu* menu);
virtual void OnInternalIdle();
void OnMenuHighlight( wxMenuEvent& event );
wxMenuBar *m_frameMenuBar;
wxMenuBar *m_mdiMenuBar;
wxStatusBar *m_frameStatusBar;
wxToolBar *m_frameToolBar;
wxString m_title;
wxIcon m_icon;
int m_miniEdge,m_miniTitle;
// implementation
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void GtkOnSize( int x, int y, int width, int height );
virtual wxPoint GetClientAreaOrigin() const;
void DoMenuUpdates();
void DoMenuUpdates(wxMenu* menu);
virtual void OnInternalIdle();
virtual void DoSetClientSize(int width, int height);
wxMenuBar *m_frameMenuBar;
wxMenuBar *m_mdiMenuBar;
wxStatusBar *m_frameStatusBar;
wxToolBar *m_frameToolBar;
wxString m_title;
wxIcon m_icon;
int m_miniEdge,m_miniTitle;
DECLARE_EVENT_TABLE()
private:
DECLARE_EVENT_TABLE()
};
#endif // __GTKFRAMEH__

View File

@@ -131,8 +131,11 @@ class wxMDIChildFrame: public wxFrame
virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {}
// no size hints
virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH), int WXUNUSED(maxW),
int WXUNUSED(maxH), int WXUNUSED(incW) ) {}
virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH),
int WXUNUSED(maxW), int WXUNUSED(maxH),
int WXUNUSED(incW) )
{
}
// no toolbar bars
virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id),

View File

@@ -12,7 +12,7 @@
#define __GTKWINDOWH__
#ifdef __GNUG__
#pragma interface
#pragma interface
#endif
#include "wx/defs.h"
@@ -36,7 +36,7 @@ extern wxList wxTopLevelWindows;
// global function
//-----------------------------------------------------------------------------
wxWindow* wxGetActiveWindow();
extern wxWindow* wxGetActiveWindow();
//-----------------------------------------------------------------------------
// classes
@@ -49,11 +49,11 @@ class wxClientData;
class wxVoidClientData;
class wxWindow;
#if wxUSE_WX_RESOURCES
class wxResourceTable;
class wxItemResource;
class wxResourceTable;
class wxItemResource;
#endif
#if wxUSE_DRAG_AND_DROP
class wxDropTarget;
class wxDropTarget;
#endif
class wxToolTip;
@@ -78,15 +78,15 @@ extern const wxPoint wxDefaultPosition;
class wxClientData
{
public:
wxClientData() { }
virtual ~wxClientData() { }
wxClientData() { }
virtual ~wxClientData() { }
};
//-----------------------------------------------------------------------------
// wxStringClientData
//-----------------------------------------------------------------------------
class wxStringClientData: public wxClientData
class wxStringClientData : public wxClientData
{
public:
wxStringClientData() { }
@@ -112,336 +112,438 @@ void debug_focus_in( GtkWidget* widget, const char* name, const char* window );
// wxWindow
//-----------------------------------------------------------------------------
class wxWindow: public wxEvtHandler
class wxWindow : public wxEvtHandler
{
DECLARE_DYNAMIC_CLASS(wxWindow)
DECLARE_DYNAMIC_CLASS(wxWindow)
public:
wxWindow();
wxWindow(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
virtual ~wxWindow();
// creating the window
// -------------------
wxWindow();
wxWindow(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
virtual ~wxWindow();
#if wxUSE_WX_RESOURCES
virtual bool LoadFromResource( wxWindow *parent, const wxString& resourceName,
const wxResourceTable *table = (const wxResourceTable *) NULL);
virtual wxControl *CreateItem(const wxItemResource* childResource, const wxItemResource* parentResource,
const wxResourceTable *table = (const wxResourceTable *) NULL);
#endif
virtual bool LoadFromResource(wxWindow *parent,
const wxString& resourceName,
const wxResourceTable *table = (const wxResourceTable *) NULL);
virtual wxControl *CreateItem(const wxItemResource* childResource,
const wxItemResource* parentResource,
const wxResourceTable *table = (const wxResourceTable *) NULL);
#endif // wxUSE_WX_RESOURCES
bool Close( bool force = FALSE );
virtual bool Destroy();
virtual bool DestroyChildren();
// closing the window
// ------------------
bool Close( bool force = FALSE );
virtual bool Destroy();
virtual bool DestroyChildren();
virtual void PrepareDC( wxDC &dc );
bool IsBeingDeleted();
virtual void SetSize( int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO );
virtual void SetSize( int width, int height );
// moving/resizing
// ---------------
virtual void Move( int x, int y );
// set the window size and/or position
void SetSize( int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO )
{ DoSetSize(x, y, width, height, sizeFlags); }
virtual void GetSize( int *width, int *height ) const;
wxSize GetSize() const { int w, h; GetSize(& w, & h); return wxSize(w, h); }
void SetSize( int width, int height )
{ DoSetSize( -1, -1, width, height, wxSIZE_USE_EXISTING ); }
virtual void SetClientSize( int width, int height );
void SetSize( const wxSize& size )
{ SetSize( size.x, size.y); }
virtual void GetClientSize( int *width, int *height ) const;
wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ DoSetSize(rect.x, rect.y, rect.width, rect.height, sizeFlags); }
virtual void GetPosition( int *x, int *y ) const;
wxPoint GetPosition() const { int w, h; GetPosition(& w, & h); return wxPoint(w, h); }
void Move( int x, int y )
{ DoSetSize( x, y, -1, -1, wxSIZE_USE_EXISTING ); }
wxRect GetRect() const
{ int x, y, w, h; GetPosition(& x, & y); GetSize(& w, & h); return wxRect(x, y, w, h); }
void Move(const wxPoint& pt)
{ Move(pt.x, pt.y); }
virtual void Centre( int direction = wxHORIZONTAL );
inline void Center(int direction = wxHORIZONTAL) { Centre(direction); }
virtual void Fit();
// client size is the size of area available for subwindows
void SetClientSize( int width, int height )
{ DoSetClientSize(width, height); }
virtual void SetSizeHints( int minW, int minH, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1 );
void SetClientSize( const wxSize& size )
{ DoSetClientSize(size.x, size.y); }
/* 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); }
void SetClientSize(const wxRect& rect)
{ SetClientSize( rect.width, rect.height ); }
void OnSize( wxSizeEvent &event );
// get the window position and/or size
virtual void GetPosition( int *x, int *y ) const;
wxPoint GetPosition() const
{
int w, h;
GetPosition(& w, & h);
virtual bool Show( bool show );
virtual void Enable( bool enable );
virtual void MakeModal( bool modal );
virtual bool IsEnabled() const { return m_isEnabled; }
inline bool Enabled() const { return IsEnabled(); }
return wxPoint(w, h);
}
virtual void SetFocus();
static wxWindow *FindFocus();
virtual void GetSize( int *width, int *height ) const;
virtual void AddChild( wxWindow *child );
wxList& GetChildren() { return m_children; }
wxSize GetSize() const
{
int w, h;
GetSize(& w, & h);
return wxSize(w, h);
}
virtual void RemoveChild( wxWindow *child );
void SetReturnCode( int retCode );
int GetReturnCode();
wxRect GetRect() const
{
int x, y, w, h;
GetPosition(& x, & y);
GetSize(& w, & h);
wxWindow *GetParent() const
{ return m_parent; }
wxWindow *GetGrandParent() const
{ return (m_parent ? m_parent->m_parent : (wxWindow*)NULL); }
void SetParent( wxWindow *parent )
{ m_parent = parent; }
virtual wxWindow *ReParent( wxWindow *newParent );
return wxRect(x, y, w, h);
}
wxEvtHandler *GetEventHandler() const;
void SetEventHandler( wxEvtHandler *handler );
void PushEventHandler( wxEvtHandler *handler );
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
virtual void GetClientSize( int *width, int *height ) const;
wxSize GetClientSize() const
{
int w, h;
GetClientSize(& w, & h);
return wxSize(w, h);
}
virtual void SetValidator( const wxValidator &validator );
virtual wxValidator *GetValidator();
// position with respect to the the parent window
virtual void Centre( int direction = wxHORIZONTAL );
void Center(int direction = wxHORIZONTAL) { Centre(direction); }
virtual void Fit();
virtual void SetClientObject( wxClientData *data );
virtual wxClientData *GetClientObject();
// set min/max size of the window
virtual void SetSizeHints( int minW, int minH,
int maxW = -1, int maxH = -1,
int incW = -1, int incH = -1 );
virtual void SetClientData( void *data );
virtual void *GetClientData();
// Dialog units translations. Implemented in wincmn.cpp.
// -----------------------------------------------------
virtual void SetAcceleratorTable( const wxAcceleratorTable& accel );
virtual wxAcceleratorTable *GetAcceleratorTable() { return &m_acceleratorTable; }
wxPoint ConvertPixelsToDialog( const wxPoint& pt );
wxPoint ConvertDialogToPixels( const wxPoint& pt );
wxSize ConvertPixelsToDialog( const wxSize& sz )
{
wxPoint pt(ConvertPixelsToDialog(wxPoint(sz.x, sz.y)));
return wxSize(pt.x, pt.y);
}
bool IsBeingDeleted();
wxSize ConvertDialogToPixels( const wxSize& sz )
{
wxPoint pt(ConvertDialogToPixels(wxPoint(sz.x, sz.y)));
void SetId( wxWindowID id );
wxWindowID GetId() const;
return wxSize(pt.x, pt.y);
}
void SetCursor( const wxCursor &cursor );
void OnSize( wxSizeEvent &event );
void WarpPointer(int x, int y);
// window state
// ------------
virtual bool Show( bool show );
virtual void Enable( bool enable );
virtual void MakeModal( bool modal );
virtual bool IsEnabled() const { return m_isEnabled; }
inline bool Enabled() const { return IsEnabled(); }
virtual void SetFocus();
static wxWindow *FindFocus();
void SetReturnCode( int retCode );
int GetReturnCode();
// parent/children relations
// -------------------------
virtual void AddChild( wxWindow *child );
wxList& GetChildren() { return m_children; }
virtual void RemoveChild( wxWindow *child );
wxWindow *GetParent() const
{ return m_parent; }
wxWindow *GetGrandParent() const
{ return (m_parent ? m_parent->m_parent : (wxWindow*)NULL); }
void SetParent( wxWindow *parent )
{ m_parent = parent; }
virtual wxWindow *ReParent( wxWindow *newParent );
// event handler stuff
// -------------------
wxEvtHandler *GetEventHandler() const;
void SetEventHandler( wxEvtHandler *handler );
void PushEventHandler( wxEvtHandler *handler );
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
// validators and client data
// --------------------------
virtual void SetValidator( const wxValidator &validator );
virtual wxValidator *GetValidator();
virtual void SetClientObject( wxClientData *data );
virtual wxClientData *GetClientObject();
virtual void SetClientData( void *data );
virtual void *GetClientData();
// accelerators
// ------------
virtual void SetAcceleratorTable( const wxAcceleratorTable& accel );
virtual wxAcceleratorTable *GetAcceleratorTable() { return &m_acceleratorTable; }
void SetId( wxWindowID id );
wxWindowID GetId() const;
void SetCursor( const wxCursor &cursor );
virtual void PrepareDC( wxDC &dc );
void WarpPointer(int x, int y);
#if wxUSE_TOOLTIPS
void SetToolTip( const wxString &tip );
virtual void SetToolTip( wxToolTip *tip );
wxToolTip* GetToolTip() const { return m_toolTip; }
void SetToolTip( const wxString &tip );
virtual void SetToolTip( wxToolTip *tip );
wxToolTip* GetToolTip() const { return m_toolTip; }
#endif // wxUSE_TOOLTIPS
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
virtual void Clear();
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
virtual void Clear();
virtual wxRegion GetUpdateRegion() const;
virtual bool IsExposed( int x, int y ) const;
virtual bool IsExposed( int x, int y, int w, int h ) const;
virtual bool IsExposed( const wxPoint& pt ) const;
virtual bool IsExposed( const wxRect& rect ) const;
virtual wxRegion GetUpdateRegion() const;
virtual bool IsExposed( int x, int y ) const;
virtual bool IsExposed( int x, int y, int w, int h ) const;
virtual bool IsExposed( const wxPoint& pt ) const;
virtual bool IsExposed( const wxRect& rect ) const;
virtual wxColour GetBackgroundColour() const;
virtual void SetBackgroundColour( const wxColour &colour );
virtual wxColour GetForegroundColour() const;
virtual void SetForegroundColour( const wxColour &colour );
// colours
// -------
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, bool use16 = FALSE) const;
virtual wxColour GetBackgroundColour() const;
virtual void SetBackgroundColour( const wxColour &colour );
virtual wxColour GetForegroundColour() const;
virtual void SetForegroundColour( const wxColour &colour );
virtual void SetFont( const wxFont &font );
virtual wxFont& GetFont() { return m_font; }
// fonts
// -----
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, bool use16 = FALSE) const;
virtual void SetFont( const wxFont &font );
virtual wxFont& GetFont() { return m_font; }
// For backward compatibility
virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
virtual wxFont& GetLabelFont() { return GetFont(); };
virtual wxFont& GetButtonFont() { return GetFont(); };
virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
virtual wxFont& GetLabelFont() { return GetFont(); };
virtual wxFont& GetButtonFont() { return GetFont(); };
virtual void SetWindowStyleFlag( long flag );
virtual long GetWindowStyleFlag() const;
virtual void SetWindowStyleFlag( long flag );
virtual long GetWindowStyleFlag() const;
virtual void CaptureMouse();
virtual void ReleaseMouse();
virtual void CaptureMouse();
virtual void ReleaseMouse();
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const;
virtual void SetName( const wxString &name );
virtual wxString GetName() const;
virtual wxString GetLabel() const;
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const;
virtual void SetName( const wxString &name );
virtual wxString GetName() const;
virtual wxString GetLabel() const;
void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) { }
void OnKeyDown( wxKeyEvent &event );
void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) { }
void OnKeyDown( wxKeyEvent &event );
virtual bool IsShown() const;
virtual bool IsShown() const;
virtual void Raise();
virtual void Lower();
virtual void Raise();
virtual void Lower();
virtual bool IsRetained();
virtual wxWindow *FindWindow( long id );
virtual wxWindow *FindWindow( const wxString& name );
virtual bool IsRetained();
virtual wxWindow *FindWindow( long id );
virtual wxWindow *FindWindow( const wxString& name );
void AllowDoubleClick( bool WXUNUSED(allow) ) { }
void SetDoubleClick( bool WXUNUSED(allow) ) { }
void AllowDoubleClick( bool WXUNUSED(allow) ) { }
void SetDoubleClick( bool WXUNUSED(allow) ) { }
virtual void ClientToScreen( int *x, int *y );
virtual void ScreenToClient( int *x, int *y );
virtual void ClientToScreen( int *x, int *y );
virtual void ScreenToClient( int *x, int *y );
virtual bool Validate();
virtual bool TransferDataToWindow();
virtual bool TransferDataFromWindow();
void OnInitDialog( wxInitDialogEvent &event );
virtual void InitDialog();
virtual bool Validate();
virtual bool TransferDataToWindow();
virtual bool TransferDataFromWindow();
void OnInitDialog( wxInitDialogEvent &event );
virtual void InitDialog();
virtual bool PopupMenu( wxMenu *menu, int x, int y );
virtual bool PopupMenu( wxMenu *menu, int x, int y );
#if wxUSE_DRAG_AND_DROP
virtual void SetDropTarget( wxDropTarget *dropTarget );
virtual wxDropTarget *GetDropTarget() const;
virtual void SetDropTarget( wxDropTarget *dropTarget );
virtual wxDropTarget *GetDropTarget() const;
#endif
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE );
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, const wxRect* rect = (wxRect *) NULL );
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE );
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, const wxRect* rect = (wxRect *) NULL );
virtual bool AcceptsFocus() const;
virtual bool AcceptsFocus() const;
void UpdateWindowUI();
void UpdateWindowUI();
// implementation
// implementation
virtual wxPoint GetClientAreaOrigin() const;
virtual void AdjustForParentClientOrigin( int& x, int& y, int sizeFlags );
virtual wxPoint GetClientAreaOrigin() const;
virtual void AdjustForParentClientOrigin( int& x, int& y, int sizeFlags );
bool HasVMT();
bool HasVMT();
virtual void OnInternalIdle();
virtual void OnInternalIdle();
/* used by all classes in the widget creation process */
/* used by all classes in the widget creation process */
void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos,
const wxSize &size, long style, const wxString &name );
void PostCreation();
void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos,
const wxSize &size, long style, const wxString &name );
void PostCreation();
/* the methods below are required because many native widgets
are composed of several subwidgets and setting a style for
the widget means setting it for all subwidgets as well.
also, it is nor clear, which native widget is the top
widget where (most of) the input goes. even tooltips have
to be applied to all subwidgets. */
/* the methods below are required because many native widgets
are composed of several subwidgets and setting a style for
the widget means setting it for all subwidgets as well.
also, it is nor clear, which native widget is the top
widget where (most of) the input goes. even tooltips have
to be applied to all subwidgets. */
virtual GtkWidget* GetConnectWidget();
virtual bool IsOwnGtkWindow( GdkWindow *window );
void ConnectWidget( GtkWidget *widget );
virtual GtkWidget* GetConnectWidget();
virtual bool IsOwnGtkWindow( GdkWindow *window );
void ConnectWidget( GtkWidget *widget );
GtkStyle *GetWidgetStyle();
void SetWidgetStyle();
virtual void ApplyWidgetStyle();
GtkStyle *GetWidgetStyle();
void SetWidgetStyle();
virtual void ApplyWidgetStyle();
#if wxUSE_TOOLTIPS
virtual void ApplyToolTip( GtkTooltips *tips, const char *tip );
virtual void ApplyToolTip( GtkTooltips *tips, const char *tip );
#endif // wxUSE_TOOLTIPS
/* private member variables */
/* private member variables */
wxWindow *m_parent;
wxList m_children;
int m_x,m_y;
int m_width,m_height;
int m_minWidth,m_minHeight;
int m_maxWidth,m_maxHeight;
int m_retCode;
wxEvtHandler *m_eventHandler;
wxValidator *m_windowValidator;
wxWindow *m_parent;
wxList m_children;
int m_x,m_y;
int m_width,m_height;
int m_minWidth,m_minHeight;
int m_maxWidth,m_maxHeight;
int m_retCode;
wxEvtHandler *m_eventHandler;
wxValidator *m_windowValidator;
#if wxUSE_DRAG_AND_DROP
wxDropTarget *m_dropTarget;
wxDropTarget *m_dropTarget;
#endif
wxWindowID m_windowId;
wxCursor *m_cursor;
wxFont m_font;
wxColour m_backgroundColour;
wxColour m_foregroundColour;
wxRegion m_updateRegion;
long m_windowStyle;
bool m_isShown;
bool m_isEnabled;
wxString m_windowName;
wxAcceleratorTable m_acceleratorTable;
wxClientData *m_clientObject;
void *m_clientData;
wxWindowID m_windowId;
wxCursor *m_cursor;
wxFont m_font;
wxColour m_backgroundColour;
wxColour m_foregroundColour;
wxRegion m_updateRegion;
long m_windowStyle;
bool m_isShown;
bool m_isEnabled;
wxString m_windowName;
wxAcceleratorTable m_acceleratorTable;
wxClientData *m_clientObject;
void *m_clientData;
#if wxUSE_TOOLTIPS
wxToolTip *m_toolTip;
wxToolTip *m_toolTip;
#endif // wxUSE_TOOLTIPS
GtkWidget *m_widget;
GtkWidget *m_wxwindow;
GtkAdjustment *m_hAdjust,*m_vAdjust;
float m_oldHorizontalPos;
float m_oldVerticalPos;
bool m_needParent;
bool m_hasScrolling;
bool m_isScrolling;
bool m_hasVMT;
bool m_sizeSet;
bool m_resizing;
GdkGC *m_scrollGC;
GtkStyle *m_widgetStyle;
bool m_isStaticBox;
bool m_acceptsFocus;
GtkWidget *m_widget;
GtkWidget *m_wxwindow;
GtkAdjustment *m_hAdjust,*m_vAdjust;
float m_oldHorizontalPos;
float m_oldVerticalPos;
bool m_needParent;
bool m_hasScrolling;
bool m_isScrolling;
bool m_hasVMT;
bool m_sizeSet;
bool m_resizing;
GdkGC *m_scrollGC;
GtkStyle *m_widgetStyle;
bool m_isStaticBox;
bool m_acceptsFocus;
wxInsertChildFunction m_insertCallback;
wxInsertChildFunction m_insertCallback;
public:
wxLayoutConstraints *m_constraints;
wxList *m_constraintsInvolvedIn;
wxSizer *m_windowSizer;
wxWindow *m_sizerParent;
bool m_autoLayout;
wxLayoutConstraints *m_constraints;
wxList *m_constraintsInvolvedIn;
wxSizer *m_windowSizer;
wxWindow *m_sizerParent;
bool m_autoLayout;
wxLayoutConstraints *GetConstraints() const;
void SetConstraints( wxLayoutConstraints *constraints );
void SetAutoLayout( bool autoLayout );
bool GetAutoLayout() const;
bool Layout();
void SetSizer( wxSizer *sizer );
wxSizer *GetSizer() const;
void SetSizerParent( wxWindow *win );
wxWindow *GetSizerParent() const;
void UnsetConstraints(wxLayoutConstraints *c);
inline wxList *GetConstraintsInvolvedIn() const ;
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);
virtual void TransformSizerToActual(int *x, int *y) const ;
virtual void SizerSetSize(int x, int y, int w, int h);
virtual void SizerMove(int x, int y);
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 ;
wxLayoutConstraints *GetConstraints() const;
void SetConstraints( wxLayoutConstraints *constraints );
void SetAutoLayout( bool autoLayout );
bool GetAutoLayout() const;
bool Layout();
void SetSizer( wxSizer *sizer );
wxSizer *GetSizer() const;
void SetSizerParent( wxWindow *win );
wxWindow *GetSizerParent() const;
void UnsetConstraints(wxLayoutConstraints *c);
inline wxList *GetConstraintsInvolvedIn() const ;
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);
virtual void TransformSizerToActual(int *x, int *y) const ;
virtual void SizerSetSize(int x, int y, int w, int h);
virtual void SizerMove(int x, int y);
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 ;
protected:
// this is the virtual function to be overriden in any derived class which
// wants to change how SetSize() or Move() works - it is called by all
// versions of these functions in the base class
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
// same as DoSetSize() for the client size
virtual void DoSetClientSize(int width, int height);
private:
DECLARE_EVENT_TABLE()
DECLARE_EVENT_TABLE()
};
#endif // __GTKWINDOWH__

View File

@@ -37,70 +37,72 @@ extern const char *wxDialogNameStr;
class wxDialog: public wxPanel
{
DECLARE_DYNAMIC_CLASS(wxDialog)
DECLARE_DYNAMIC_CLASS(wxDialog)
public:
wxDialog();
wxDialog( wxWindow *parent, wxWindowID id,
wxDialog();
wxDialog( wxWindow *parent, wxWindowID id,
const wxString &title,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString &name = wxDialogNameStr );
bool Create( wxWindow *parent, wxWindowID id,
const wxString &title,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString &name = wxDialogNameStr );
~wxDialog();
bool Create( wxWindow *parent, wxWindowID id,
const wxString &title,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString &name = wxDialogNameStr );
~wxDialog();
void SetTitle(const wxString& title);
wxString GetTitle() const;
void SetTitle(const wxString& title);
wxString GetTitle() const;
void OnApply( wxCommandEvent &event );
void OnCancel( wxCommandEvent &event );
void OnOK( wxCommandEvent &event );
void OnPaint( wxPaintEvent& event );
void OnSize( wxSizeEvent &event );
void OnCloseWindow( wxCloseEvent& event );
/*
void OnCharHook( wxKeyEvent& event );
*/
void OnApply( wxCommandEvent &event );
void OnCancel( wxCommandEvent &event );
void OnOK( wxCommandEvent &event );
void OnPaint( wxPaintEvent& event );
void OnSize( wxSizeEvent &event );
void OnCloseWindow( wxCloseEvent& event );
/*
void OnCharHook( wxKeyEvent& event );
*/
bool Destroy();
bool Destroy();
virtual void SetSize( int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO );
virtual void SetSize( int width, int height );
virtual bool Show( bool show );
virtual int ShowModal();
virtual void EndModal( int retCode );
virtual bool IsModal() const;
void SetModal( bool modal );
virtual bool Show( bool show );
virtual int ShowModal();
virtual void EndModal( int retCode );
virtual bool IsModal() const;
void SetModal( bool modal );
virtual void InitDialog(void);
virtual void InitDialog(void);
virtual void Centre( int direction = wxHORIZONTAL );
virtual void Centre( int direction = wxHORIZONTAL );
virtual void SetIcon( const wxIcon &icon );
virtual void Iconize( bool WXUNUSED(iconize)) { }
virtual bool IsIconized() const { return FALSE; }
bool Iconized() const { return IsIconized(); }
virtual void Maximize() { }
virtual void Restore() { }
virtual void SetIcon( const wxIcon &icon );
virtual void Iconize( bool WXUNUSED(iconize)) { }
virtual bool IsIconized() const { return FALSE; }
bool Iconized() const { return IsIconized(); }
virtual void Maximize() { }
virtual void Restore() { }
// implementation
// implementation
virtual void GtkOnSize( int x, int y, int width, int height );
virtual void OnInternalIdle();
virtual void GtkOnSize( int x, int y, int width, int height );
virtual void OnInternalIdle();
bool m_modalShowing;
wxString m_title;
wxIcon m_icon;
bool m_modalShowing;
wxString m_title;
wxIcon m_icon;
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
DECLARE_EVENT_TABLE()
private:
DECLARE_EVENT_TABLE()
};
#endif // __GTKDIALOGH__

View File

@@ -46,82 +46,83 @@ extern const char *wxToolBarNameStr;
class wxFrame: public wxWindow
{
DECLARE_DYNAMIC_CLASS(wxFrame)
DECLARE_DYNAMIC_CLASS(wxFrame)
public:
wxFrame();
wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
~wxFrame();
bool Destroy();
wxFrame();
wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
~wxFrame();
bool Destroy();
virtual bool Show( bool show );
virtual void Centre( int direction = wxHORIZONTAL );
virtual bool Show( bool show );
virtual void Centre( int direction = wxHORIZONTAL );
virtual void GetClientSize( int *width, int *height ) const;
virtual void GetClientSize( int *width, int *height ) const;
wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
const wxString& name = "statusBar");
virtual wxStatusBar *OnCreateStatusBar( int number, long style, wxWindowID id,
const wxString& name );
virtual wxStatusBar *GetStatusBar() const;
inline void SetStatusBar(wxStatusBar *statusBar) { m_frameStatusBar = statusBar; }
virtual void SetStatusText( const wxString &text, int number = 0 );
virtual void SetStatusWidths( int n, const int widths_field[] );
virtual void SetClientSize( int width, int height );
virtual wxToolBar* CreateToolBar( long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1,
const wxString& name = wxToolBarNameStr);
virtual wxToolBar *OnCreateToolBar( long style, wxWindowID id, const wxString& name );
virtual wxToolBar *GetToolBar() const;
inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
virtual void SetSize( int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO );
virtual void SetSize( int width, int height );
virtual void SetMenuBar( wxMenuBar *menuBar );
virtual wxMenuBar *GetMenuBar() const;
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
const wxString& name = "statusBar");
virtual wxStatusBar *OnCreateStatusBar( int number, long style, wxWindowID id,
const wxString& name );
virtual wxStatusBar *GetStatusBar() const;
inline void SetStatusBar(wxStatusBar *statusBar) { m_frameStatusBar = statusBar; }
virtual void SetStatusText( const wxString &text, int number = 0 );
virtual void SetStatusWidths( int n, const int widths_field[] );
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const { return m_title; }
virtual wxToolBar* CreateToolBar( long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1,
const wxString& name = wxToolBarNameStr);
virtual wxToolBar *OnCreateToolBar( long style, wxWindowID id, const wxString& name );
virtual wxToolBar *GetToolBar() const;
inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
virtual void SetIcon( const wxIcon &icon );
virtual void Iconize( bool WXUNUSED(iconize)) { }
virtual bool IsIconized() const { return FALSE; }
bool Iconized() const { return IsIconized(); }
virtual void Maximize(bool WXUNUSED(maximize)) {}
virtual void Restore() {}
virtual void SetMenuBar( wxMenuBar *menuBar );
virtual wxMenuBar *GetMenuBar() const;
void OnCloseWindow( wxCloseEvent& event );
void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp
void OnSize( wxSizeEvent &event );
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const { return m_title; }
void OnMenuHighlight( wxMenuEvent& event );
virtual void SetIcon( const wxIcon &icon );
virtual void Iconize( bool WXUNUSED(iconize)) { }
virtual bool IsIconized() const { return FALSE; }
bool Iconized() const { return IsIconized(); }
virtual void Maximize(bool WXUNUSED(maximize)) {}
virtual void Restore() {}
// implementation
void OnCloseWindow( wxCloseEvent& event );
void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp
void OnSize( wxSizeEvent &event );
virtual void GtkOnSize( int x, int y, int width, int height );
virtual wxPoint GetClientAreaOrigin() const;
void DoMenuUpdates();
void DoMenuUpdates(wxMenu* menu);
virtual void OnInternalIdle();
void OnMenuHighlight( wxMenuEvent& event );
wxMenuBar *m_frameMenuBar;
wxMenuBar *m_mdiMenuBar;
wxStatusBar *m_frameStatusBar;
wxToolBar *m_frameToolBar;
wxString m_title;
wxIcon m_icon;
int m_miniEdge,m_miniTitle;
// implementation
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void GtkOnSize( int x, int y, int width, int height );
virtual wxPoint GetClientAreaOrigin() const;
void DoMenuUpdates();
void DoMenuUpdates(wxMenu* menu);
virtual void OnInternalIdle();
virtual void DoSetClientSize(int width, int height);
wxMenuBar *m_frameMenuBar;
wxMenuBar *m_mdiMenuBar;
wxStatusBar *m_frameStatusBar;
wxToolBar *m_frameToolBar;
wxString m_title;
wxIcon m_icon;
int m_miniEdge,m_miniTitle;
DECLARE_EVENT_TABLE()
private:
DECLARE_EVENT_TABLE()
};
#endif // __GTKFRAMEH__

View File

@@ -131,8 +131,11 @@ class wxMDIChildFrame: public wxFrame
virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {}
// no size hints
virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH), int WXUNUSED(maxW),
int WXUNUSED(maxH), int WXUNUSED(incW) ) {}
virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH),
int WXUNUSED(maxW), int WXUNUSED(maxH),
int WXUNUSED(incW) )
{
}
// no toolbar bars
virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id),

View File

@@ -12,7 +12,7 @@
#define __GTKWINDOWH__
#ifdef __GNUG__
#pragma interface
#pragma interface
#endif
#include "wx/defs.h"
@@ -36,7 +36,7 @@ extern wxList wxTopLevelWindows;
// global function
//-----------------------------------------------------------------------------
wxWindow* wxGetActiveWindow();
extern wxWindow* wxGetActiveWindow();
//-----------------------------------------------------------------------------
// classes
@@ -49,11 +49,11 @@ class wxClientData;
class wxVoidClientData;
class wxWindow;
#if wxUSE_WX_RESOURCES
class wxResourceTable;
class wxItemResource;
class wxResourceTable;
class wxItemResource;
#endif
#if wxUSE_DRAG_AND_DROP
class wxDropTarget;
class wxDropTarget;
#endif
class wxToolTip;
@@ -78,15 +78,15 @@ extern const wxPoint wxDefaultPosition;
class wxClientData
{
public:
wxClientData() { }
virtual ~wxClientData() { }
wxClientData() { }
virtual ~wxClientData() { }
};
//-----------------------------------------------------------------------------
// wxStringClientData
//-----------------------------------------------------------------------------
class wxStringClientData: public wxClientData
class wxStringClientData : public wxClientData
{
public:
wxStringClientData() { }
@@ -112,336 +112,438 @@ void debug_focus_in( GtkWidget* widget, const char* name, const char* window );
// wxWindow
//-----------------------------------------------------------------------------
class wxWindow: public wxEvtHandler
class wxWindow : public wxEvtHandler
{
DECLARE_DYNAMIC_CLASS(wxWindow)
DECLARE_DYNAMIC_CLASS(wxWindow)
public:
wxWindow();
wxWindow(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
virtual ~wxWindow();
// creating the window
// -------------------
wxWindow();
wxWindow(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
virtual ~wxWindow();
#if wxUSE_WX_RESOURCES
virtual bool LoadFromResource( wxWindow *parent, const wxString& resourceName,
const wxResourceTable *table = (const wxResourceTable *) NULL);
virtual wxControl *CreateItem(const wxItemResource* childResource, const wxItemResource* parentResource,
const wxResourceTable *table = (const wxResourceTable *) NULL);
#endif
virtual bool LoadFromResource(wxWindow *parent,
const wxString& resourceName,
const wxResourceTable *table = (const wxResourceTable *) NULL);
virtual wxControl *CreateItem(const wxItemResource* childResource,
const wxItemResource* parentResource,
const wxResourceTable *table = (const wxResourceTable *) NULL);
#endif // wxUSE_WX_RESOURCES
bool Close( bool force = FALSE );
virtual bool Destroy();
virtual bool DestroyChildren();
// closing the window
// ------------------
bool Close( bool force = FALSE );
virtual bool Destroy();
virtual bool DestroyChildren();
virtual void PrepareDC( wxDC &dc );
bool IsBeingDeleted();
virtual void SetSize( int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO );
virtual void SetSize( int width, int height );
// moving/resizing
// ---------------
virtual void Move( int x, int y );
// set the window size and/or position
void SetSize( int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO )
{ DoSetSize(x, y, width, height, sizeFlags); }
virtual void GetSize( int *width, int *height ) const;
wxSize GetSize() const { int w, h; GetSize(& w, & h); return wxSize(w, h); }
void SetSize( int width, int height )
{ DoSetSize( -1, -1, width, height, wxSIZE_USE_EXISTING ); }
virtual void SetClientSize( int width, int height );
void SetSize( const wxSize& size )
{ SetSize( size.x, size.y); }
virtual void GetClientSize( int *width, int *height ) const;
wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ DoSetSize(rect.x, rect.y, rect.width, rect.height, sizeFlags); }
virtual void GetPosition( int *x, int *y ) const;
wxPoint GetPosition() const { int w, h; GetPosition(& w, & h); return wxPoint(w, h); }
void Move( int x, int y )
{ DoSetSize( x, y, -1, -1, wxSIZE_USE_EXISTING ); }
wxRect GetRect() const
{ int x, y, w, h; GetPosition(& x, & y); GetSize(& w, & h); return wxRect(x, y, w, h); }
void Move(const wxPoint& pt)
{ Move(pt.x, pt.y); }
virtual void Centre( int direction = wxHORIZONTAL );
inline void Center(int direction = wxHORIZONTAL) { Centre(direction); }
virtual void Fit();
// client size is the size of area available for subwindows
void SetClientSize( int width, int height )
{ DoSetClientSize(width, height); }
virtual void SetSizeHints( int minW, int minH, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1 );
void SetClientSize( const wxSize& size )
{ DoSetClientSize(size.x, size.y); }
/* 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); }
void SetClientSize(const wxRect& rect)
{ SetClientSize( rect.width, rect.height ); }
void OnSize( wxSizeEvent &event );
// get the window position and/or size
virtual void GetPosition( int *x, int *y ) const;
wxPoint GetPosition() const
{
int w, h;
GetPosition(& w, & h);
virtual bool Show( bool show );
virtual void Enable( bool enable );
virtual void MakeModal( bool modal );
virtual bool IsEnabled() const { return m_isEnabled; }
inline bool Enabled() const { return IsEnabled(); }
return wxPoint(w, h);
}
virtual void SetFocus();
static wxWindow *FindFocus();
virtual void GetSize( int *width, int *height ) const;
virtual void AddChild( wxWindow *child );
wxList& GetChildren() { return m_children; }
wxSize GetSize() const
{
int w, h;
GetSize(& w, & h);
return wxSize(w, h);
}
virtual void RemoveChild( wxWindow *child );
void SetReturnCode( int retCode );
int GetReturnCode();
wxRect GetRect() const
{
int x, y, w, h;
GetPosition(& x, & y);
GetSize(& w, & h);
wxWindow *GetParent() const
{ return m_parent; }
wxWindow *GetGrandParent() const
{ return (m_parent ? m_parent->m_parent : (wxWindow*)NULL); }
void SetParent( wxWindow *parent )
{ m_parent = parent; }
virtual wxWindow *ReParent( wxWindow *newParent );
return wxRect(x, y, w, h);
}
wxEvtHandler *GetEventHandler() const;
void SetEventHandler( wxEvtHandler *handler );
void PushEventHandler( wxEvtHandler *handler );
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
virtual void GetClientSize( int *width, int *height ) const;
wxSize GetClientSize() const
{
int w, h;
GetClientSize(& w, & h);
return wxSize(w, h);
}
virtual void SetValidator( const wxValidator &validator );
virtual wxValidator *GetValidator();
// position with respect to the the parent window
virtual void Centre( int direction = wxHORIZONTAL );
void Center(int direction = wxHORIZONTAL) { Centre(direction); }
virtual void Fit();
virtual void SetClientObject( wxClientData *data );
virtual wxClientData *GetClientObject();
// set min/max size of the window
virtual void SetSizeHints( int minW, int minH,
int maxW = -1, int maxH = -1,
int incW = -1, int incH = -1 );
virtual void SetClientData( void *data );
virtual void *GetClientData();
// Dialog units translations. Implemented in wincmn.cpp.
// -----------------------------------------------------
virtual void SetAcceleratorTable( const wxAcceleratorTable& accel );
virtual wxAcceleratorTable *GetAcceleratorTable() { return &m_acceleratorTable; }
wxPoint ConvertPixelsToDialog( const wxPoint& pt );
wxPoint ConvertDialogToPixels( const wxPoint& pt );
wxSize ConvertPixelsToDialog( const wxSize& sz )
{
wxPoint pt(ConvertPixelsToDialog(wxPoint(sz.x, sz.y)));
return wxSize(pt.x, pt.y);
}
bool IsBeingDeleted();
wxSize ConvertDialogToPixels( const wxSize& sz )
{
wxPoint pt(ConvertDialogToPixels(wxPoint(sz.x, sz.y)));
void SetId( wxWindowID id );
wxWindowID GetId() const;
return wxSize(pt.x, pt.y);
}
void SetCursor( const wxCursor &cursor );
void OnSize( wxSizeEvent &event );
void WarpPointer(int x, int y);
// window state
// ------------
virtual bool Show( bool show );
virtual void Enable( bool enable );
virtual void MakeModal( bool modal );
virtual bool IsEnabled() const { return m_isEnabled; }
inline bool Enabled() const { return IsEnabled(); }
virtual void SetFocus();
static wxWindow *FindFocus();
void SetReturnCode( int retCode );
int GetReturnCode();
// parent/children relations
// -------------------------
virtual void AddChild( wxWindow *child );
wxList& GetChildren() { return m_children; }
virtual void RemoveChild( wxWindow *child );
wxWindow *GetParent() const
{ return m_parent; }
wxWindow *GetGrandParent() const
{ return (m_parent ? m_parent->m_parent : (wxWindow*)NULL); }
void SetParent( wxWindow *parent )
{ m_parent = parent; }
virtual wxWindow *ReParent( wxWindow *newParent );
// event handler stuff
// -------------------
wxEvtHandler *GetEventHandler() const;
void SetEventHandler( wxEvtHandler *handler );
void PushEventHandler( wxEvtHandler *handler );
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
// validators and client data
// --------------------------
virtual void SetValidator( const wxValidator &validator );
virtual wxValidator *GetValidator();
virtual void SetClientObject( wxClientData *data );
virtual wxClientData *GetClientObject();
virtual void SetClientData( void *data );
virtual void *GetClientData();
// accelerators
// ------------
virtual void SetAcceleratorTable( const wxAcceleratorTable& accel );
virtual wxAcceleratorTable *GetAcceleratorTable() { return &m_acceleratorTable; }
void SetId( wxWindowID id );
wxWindowID GetId() const;
void SetCursor( const wxCursor &cursor );
virtual void PrepareDC( wxDC &dc );
void WarpPointer(int x, int y);
#if wxUSE_TOOLTIPS
void SetToolTip( const wxString &tip );
virtual void SetToolTip( wxToolTip *tip );
wxToolTip* GetToolTip() const { return m_toolTip; }
void SetToolTip( const wxString &tip );
virtual void SetToolTip( wxToolTip *tip );
wxToolTip* GetToolTip() const { return m_toolTip; }
#endif // wxUSE_TOOLTIPS
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
virtual void Clear();
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
virtual void Clear();
virtual wxRegion GetUpdateRegion() const;
virtual bool IsExposed( int x, int y ) const;
virtual bool IsExposed( int x, int y, int w, int h ) const;
virtual bool IsExposed( const wxPoint& pt ) const;
virtual bool IsExposed( const wxRect& rect ) const;
virtual wxRegion GetUpdateRegion() const;
virtual bool IsExposed( int x, int y ) const;
virtual bool IsExposed( int x, int y, int w, int h ) const;
virtual bool IsExposed( const wxPoint& pt ) const;
virtual bool IsExposed( const wxRect& rect ) const;
virtual wxColour GetBackgroundColour() const;
virtual void SetBackgroundColour( const wxColour &colour );
virtual wxColour GetForegroundColour() const;
virtual void SetForegroundColour( const wxColour &colour );
// colours
// -------
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, bool use16 = FALSE) const;
virtual wxColour GetBackgroundColour() const;
virtual void SetBackgroundColour( const wxColour &colour );
virtual wxColour GetForegroundColour() const;
virtual void SetForegroundColour( const wxColour &colour );
virtual void SetFont( const wxFont &font );
virtual wxFont& GetFont() { return m_font; }
// fonts
// -----
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, bool use16 = FALSE) const;
virtual void SetFont( const wxFont &font );
virtual wxFont& GetFont() { return m_font; }
// For backward compatibility
virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
virtual wxFont& GetLabelFont() { return GetFont(); };
virtual wxFont& GetButtonFont() { return GetFont(); };
virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
virtual wxFont& GetLabelFont() { return GetFont(); };
virtual wxFont& GetButtonFont() { return GetFont(); };
virtual void SetWindowStyleFlag( long flag );
virtual long GetWindowStyleFlag() const;
virtual void SetWindowStyleFlag( long flag );
virtual long GetWindowStyleFlag() const;
virtual void CaptureMouse();
virtual void ReleaseMouse();
virtual void CaptureMouse();
virtual void ReleaseMouse();
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const;
virtual void SetName( const wxString &name );
virtual wxString GetName() const;
virtual wxString GetLabel() const;
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const;
virtual void SetName( const wxString &name );
virtual wxString GetName() const;
virtual wxString GetLabel() const;
void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) { }
void OnKeyDown( wxKeyEvent &event );
void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) { }
void OnKeyDown( wxKeyEvent &event );
virtual bool IsShown() const;
virtual bool IsShown() const;
virtual void Raise();
virtual void Lower();
virtual void Raise();
virtual void Lower();
virtual bool IsRetained();
virtual wxWindow *FindWindow( long id );
virtual wxWindow *FindWindow( const wxString& name );
virtual bool IsRetained();
virtual wxWindow *FindWindow( long id );
virtual wxWindow *FindWindow( const wxString& name );
void AllowDoubleClick( bool WXUNUSED(allow) ) { }
void SetDoubleClick( bool WXUNUSED(allow) ) { }
void AllowDoubleClick( bool WXUNUSED(allow) ) { }
void SetDoubleClick( bool WXUNUSED(allow) ) { }
virtual void ClientToScreen( int *x, int *y );
virtual void ScreenToClient( int *x, int *y );
virtual void ClientToScreen( int *x, int *y );
virtual void ScreenToClient( int *x, int *y );
virtual bool Validate();
virtual bool TransferDataToWindow();
virtual bool TransferDataFromWindow();
void OnInitDialog( wxInitDialogEvent &event );
virtual void InitDialog();
virtual bool Validate();
virtual bool TransferDataToWindow();
virtual bool TransferDataFromWindow();
void OnInitDialog( wxInitDialogEvent &event );
virtual void InitDialog();
virtual bool PopupMenu( wxMenu *menu, int x, int y );
virtual bool PopupMenu( wxMenu *menu, int x, int y );
#if wxUSE_DRAG_AND_DROP
virtual void SetDropTarget( wxDropTarget *dropTarget );
virtual wxDropTarget *GetDropTarget() const;
virtual void SetDropTarget( wxDropTarget *dropTarget );
virtual wxDropTarget *GetDropTarget() const;
#endif
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE );
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, const wxRect* rect = (wxRect *) NULL );
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE );
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, const wxRect* rect = (wxRect *) NULL );
virtual bool AcceptsFocus() const;
virtual bool AcceptsFocus() const;
void UpdateWindowUI();
void UpdateWindowUI();
// implementation
// implementation
virtual wxPoint GetClientAreaOrigin() const;
virtual void AdjustForParentClientOrigin( int& x, int& y, int sizeFlags );
virtual wxPoint GetClientAreaOrigin() const;
virtual void AdjustForParentClientOrigin( int& x, int& y, int sizeFlags );
bool HasVMT();
bool HasVMT();
virtual void OnInternalIdle();
virtual void OnInternalIdle();
/* used by all classes in the widget creation process */
/* used by all classes in the widget creation process */
void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos,
const wxSize &size, long style, const wxString &name );
void PostCreation();
void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos,
const wxSize &size, long style, const wxString &name );
void PostCreation();
/* the methods below are required because many native widgets
are composed of several subwidgets and setting a style for
the widget means setting it for all subwidgets as well.
also, it is nor clear, which native widget is the top
widget where (most of) the input goes. even tooltips have
to be applied to all subwidgets. */
/* the methods below are required because many native widgets
are composed of several subwidgets and setting a style for
the widget means setting it for all subwidgets as well.
also, it is nor clear, which native widget is the top
widget where (most of) the input goes. even tooltips have
to be applied to all subwidgets. */
virtual GtkWidget* GetConnectWidget();
virtual bool IsOwnGtkWindow( GdkWindow *window );
void ConnectWidget( GtkWidget *widget );
virtual GtkWidget* GetConnectWidget();
virtual bool IsOwnGtkWindow( GdkWindow *window );
void ConnectWidget( GtkWidget *widget );
GtkStyle *GetWidgetStyle();
void SetWidgetStyle();
virtual void ApplyWidgetStyle();
GtkStyle *GetWidgetStyle();
void SetWidgetStyle();
virtual void ApplyWidgetStyle();
#if wxUSE_TOOLTIPS
virtual void ApplyToolTip( GtkTooltips *tips, const char *tip );
virtual void ApplyToolTip( GtkTooltips *tips, const char *tip );
#endif // wxUSE_TOOLTIPS
/* private member variables */
/* private member variables */
wxWindow *m_parent;
wxList m_children;
int m_x,m_y;
int m_width,m_height;
int m_minWidth,m_minHeight;
int m_maxWidth,m_maxHeight;
int m_retCode;
wxEvtHandler *m_eventHandler;
wxValidator *m_windowValidator;
wxWindow *m_parent;
wxList m_children;
int m_x,m_y;
int m_width,m_height;
int m_minWidth,m_minHeight;
int m_maxWidth,m_maxHeight;
int m_retCode;
wxEvtHandler *m_eventHandler;
wxValidator *m_windowValidator;
#if wxUSE_DRAG_AND_DROP
wxDropTarget *m_dropTarget;
wxDropTarget *m_dropTarget;
#endif
wxWindowID m_windowId;
wxCursor *m_cursor;
wxFont m_font;
wxColour m_backgroundColour;
wxColour m_foregroundColour;
wxRegion m_updateRegion;
long m_windowStyle;
bool m_isShown;
bool m_isEnabled;
wxString m_windowName;
wxAcceleratorTable m_acceleratorTable;
wxClientData *m_clientObject;
void *m_clientData;
wxWindowID m_windowId;
wxCursor *m_cursor;
wxFont m_font;
wxColour m_backgroundColour;
wxColour m_foregroundColour;
wxRegion m_updateRegion;
long m_windowStyle;
bool m_isShown;
bool m_isEnabled;
wxString m_windowName;
wxAcceleratorTable m_acceleratorTable;
wxClientData *m_clientObject;
void *m_clientData;
#if wxUSE_TOOLTIPS
wxToolTip *m_toolTip;
wxToolTip *m_toolTip;
#endif // wxUSE_TOOLTIPS
GtkWidget *m_widget;
GtkWidget *m_wxwindow;
GtkAdjustment *m_hAdjust,*m_vAdjust;
float m_oldHorizontalPos;
float m_oldVerticalPos;
bool m_needParent;
bool m_hasScrolling;
bool m_isScrolling;
bool m_hasVMT;
bool m_sizeSet;
bool m_resizing;
GdkGC *m_scrollGC;
GtkStyle *m_widgetStyle;
bool m_isStaticBox;
bool m_acceptsFocus;
GtkWidget *m_widget;
GtkWidget *m_wxwindow;
GtkAdjustment *m_hAdjust,*m_vAdjust;
float m_oldHorizontalPos;
float m_oldVerticalPos;
bool m_needParent;
bool m_hasScrolling;
bool m_isScrolling;
bool m_hasVMT;
bool m_sizeSet;
bool m_resizing;
GdkGC *m_scrollGC;
GtkStyle *m_widgetStyle;
bool m_isStaticBox;
bool m_acceptsFocus;
wxInsertChildFunction m_insertCallback;
wxInsertChildFunction m_insertCallback;
public:
wxLayoutConstraints *m_constraints;
wxList *m_constraintsInvolvedIn;
wxSizer *m_windowSizer;
wxWindow *m_sizerParent;
bool m_autoLayout;
wxLayoutConstraints *m_constraints;
wxList *m_constraintsInvolvedIn;
wxSizer *m_windowSizer;
wxWindow *m_sizerParent;
bool m_autoLayout;
wxLayoutConstraints *GetConstraints() const;
void SetConstraints( wxLayoutConstraints *constraints );
void SetAutoLayout( bool autoLayout );
bool GetAutoLayout() const;
bool Layout();
void SetSizer( wxSizer *sizer );
wxSizer *GetSizer() const;
void SetSizerParent( wxWindow *win );
wxWindow *GetSizerParent() const;
void UnsetConstraints(wxLayoutConstraints *c);
inline wxList *GetConstraintsInvolvedIn() const ;
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);
virtual void TransformSizerToActual(int *x, int *y) const ;
virtual void SizerSetSize(int x, int y, int w, int h);
virtual void SizerMove(int x, int y);
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 ;
wxLayoutConstraints *GetConstraints() const;
void SetConstraints( wxLayoutConstraints *constraints );
void SetAutoLayout( bool autoLayout );
bool GetAutoLayout() const;
bool Layout();
void SetSizer( wxSizer *sizer );
wxSizer *GetSizer() const;
void SetSizerParent( wxWindow *win );
wxWindow *GetSizerParent() const;
void UnsetConstraints(wxLayoutConstraints *c);
inline wxList *GetConstraintsInvolvedIn() const ;
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);
virtual void TransformSizerToActual(int *x, int *y) const ;
virtual void SizerSetSize(int x, int y, int w, int h);
virtual void SizerMove(int x, int y);
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 ;
protected:
// this is the virtual function to be overriden in any derived class which
// wants to change how SetSize() or Move() works - it is called by all
// versions of these functions in the base class
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
// same as DoSetSize() for the client size
virtual void DoSetClientSize(int width, int height);
private:
DECLARE_EVENT_TABLE()
DECLARE_EVENT_TABLE()
};
#endif // __GTKWINDOWH__

View File

@@ -232,21 +232,11 @@ public:
bool Create(wxWindow *parent, wxSizerBehaviour behav = wxSizerNone);
virtual void SetSize(int x, int y, int w, int h, int flags = wxSIZE_AUTO);
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect.x, rect.y, rect.width, rect.height, sizeFlags); }
virtual void SetSize(const wxSize& size)
{ wxWindow::SetSize(size.x, size.y); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
virtual void GetSize(int *w, int *h) const;
wxSize GetSize() const { return wxWindow::GetSize(); }
virtual void GetClientSize(int *w, int *h) const { GetSize(w, h); }
wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
virtual void GetPosition(int *x, int *y) const;
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
void SizerSetSize(int x, int y, int w, int h) { SetSize(x, y, w, h); }
void SizerMove(int x, int y) { Move(x, y); }
@@ -263,6 +253,11 @@ public:
virtual bool LayoutPhase1(int *);
virtual bool LayoutPhase2(int *);
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#define wxSIZER_ROWS TRUE
@@ -287,7 +282,6 @@ public:
bool Create(wxWindow *parent, bool rowOrCol = wxSIZER_ROWS,
int rowsOrColSize = 20, wxSizerBehaviour = wxSizerShrink);
virtual void SetSize(int x, int y, int w, int h, int flags = wxSIZE_AUTO);
virtual void SetRowOrCol(bool rc) { rowOrCol = rc; }
virtual bool GetRowOrCol() { return rowOrCol; }

View File

@@ -54,39 +54,38 @@ class WXDLLEXPORT wxCheckBox: public wxControl
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
{
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
public:
int checkWidth ;
int checkHeight ;
public:
int checkWidth;
int checkHeight;
inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
virtual void SetValue(bool);
virtual bool GetValue() const ;
virtual void SetValue(bool value);
virtual bool GetValue() const;
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
virtual void SetLabel(const wxBitmap& bitmap);
virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
virtual void SetLabel(const wxBitmap& bitmap);
virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif
// _WX_CHECKBOX_H_

View File

@@ -23,70 +23,68 @@ WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
// Choice item
class WXDLLEXPORT wxChoice: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxChoice)
DECLARE_DYNAMIC_CLASS(wxChoice)
public:
wxChoice();
~wxChoice();
public:
wxChoice();
~wxChoice();
inline wxChoice(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr)
{
Create(parent, id, pos, size, n, choices, style, validator, name);
}
wxChoice(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr)
{
Create(parent, id, pos, size, n, choices, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr);
virtual void Append(const wxString& item);
virtual void Delete(int n);
virtual void Clear();
virtual int GetSelection() const ;
virtual void SetSelection(int n);
virtual int FindString(const wxString& s) const;
virtual wxString GetString(int n) const ;
virtual void Append(const wxString& item);
virtual void Delete(int n);
virtual void Clear();
virtual int GetSelection() const ;
virtual void SetSelection(int n);
virtual int FindString(const wxString& s) const;
virtual wxString GetString(int n) const ;
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
virtual wxString GetStringSelection() const ;
virtual bool SetStringSelection(const wxString& sel);
virtual wxString GetStringSelection() const ;
virtual bool SetStringSelection(const wxString& sel);
virtual int Number() const { return m_noStrings; }
virtual void Command(wxCommandEvent& event);
virtual inline int Number() const { return m_noStrings; }
virtual void Command(wxCommandEvent& event);
virtual void SetColumns(int n = 1 );
virtual int GetColumns() const ;
virtual void SetColumns(int n = 1 );
virtual int GetColumns() const ;
void SetFocus();
void SetFocus();
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetTopWidget() const { return m_formWidget; }
WXWidget GetMainWidget() const { return m_buttonWidget; }
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetTopWidget() const { return m_formWidget; }
WXWidget GetMainWidget() const { return m_buttonWidget; }
protected:
int m_noStrings;
WXWidget m_menuWidget;
WXWidget m_buttonWidget;
WXWidget* m_widgetList ;
WXWidget m_formWidget;
wxStringList m_stringList;
int m_noStrings;
WXWidget m_menuWidget;
WXWidget m_buttonWidget;
WXWidget* m_widgetList ;
WXWidget m_formWidget;
wxStringList m_stringList;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -24,74 +24,73 @@ WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
// Combobox item
class WXDLLEXPORT wxComboBox: public wxChoice
{
DECLARE_DYNAMIC_CLASS(wxComboBox)
DECLARE_DYNAMIC_CLASS(wxComboBox)
public:
inline wxComboBox() {}
~wxComboBox();
public:
inline wxComboBox() {}
~wxComboBox();
inline wxComboBox(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Create(parent, id, value, pos, size, n, choices, style, validator, name);
}
inline wxComboBox(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Create(parent, id, value, pos, size, n, choices, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
// List functions
virtual void Append(const wxString& item);
virtual void Delete(int n);
virtual void Clear();
virtual int GetSelection() const ;
virtual void SetSelection(int n);
virtual int FindString(const wxString& s) const;
virtual wxString GetString(int n) const ;
virtual wxString GetStringSelection() const ;
virtual bool SetStringSelection(const wxString& sel);
virtual inline int Number() const { return m_noStrings; }
// List functions
virtual void Append(const wxString& item);
virtual void Delete(int n);
virtual void Clear();
virtual int GetSelection() const ;
virtual void SetSelection(int n);
virtual int FindString(const wxString& s) const;
virtual wxString GetString(int n) const ;
virtual wxString GetStringSelection() const ;
virtual bool SetStringSelection(const wxString& sel);
virtual inline int Number() const { return m_noStrings; }
// Text field functions
virtual wxString GetValue() const ;
virtual void SetValue(const wxString& value);
// Text field functions
virtual wxString GetValue() const ;
virtual void SetValue(const wxString& value);
// Clipboard operations
virtual void Copy();
virtual void Cut();
virtual void Paste();
virtual void SetInsertionPoint(long pos);
virtual void SetInsertionPointEnd();
virtual long GetInsertionPoint() const ;
virtual long GetLastPosition() const ;
virtual void Replace(long from, long to, const wxString& value);
virtual void Remove(long from, long to);
virtual void SetSelection(long from, long to);
virtual void SetEditable(bool editable);
// Clipboard operations
virtual void Copy();
virtual void Cut();
virtual void Paste();
virtual void SetInsertionPoint(long pos);
virtual void SetInsertionPointEnd();
virtual long GetInsertionPoint() const ;
virtual long GetLastPosition() const ;
virtual void Replace(long from, long to, const wxString& value);
virtual void Remove(long from, long to);
virtual void SetSelection(long from, long to);
virtual void SetEditable(bool editable);
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetTopWidget() const { return m_mainWidget; }
WXWidget GetMainWidget() const { return m_mainWidget; }
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetTopWidget() const { return m_mainWidget; }
WXWidget GetMainWidget() const { return m_mainWidget; }
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -21,99 +21,98 @@
WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr;
// Dialog boxes
class WXDLLEXPORT wxDialog: public wxPanel
class WXDLLEXPORT wxDialog : public wxPanel
{
DECLARE_DYNAMIC_CLASS(wxDialog)
public:
wxDialog();
// Constructor with a modal flag, but no window id - the old convention
inline wxDialog(wxWindow *parent,
const wxString& title, bool modal,
int x = -1, int y= -1, int width = 500, int height = 500,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr)
{
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name);
}
// Constructor with no modal flag - the new convention.
inline wxDialog(wxWindow *parent, wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& title, // bool modal = FALSE, // TODO make this a window style?
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr);
~wxDialog();
virtual bool Destroy();
void SetClientSize(int width, int height);
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
bool Show(bool show);
void Iconize(bool iconize);
void Raise();
void Lower();
virtual bool IsIconized() const;
void Fit();
void SetTitle(const wxString& title);
wxString GetTitle() const ;
// bool OnClose();
void OnCharHook(wxKeyEvent& event);
void OnCloseWindow(wxCloseEvent& event);
void SetModal(bool flag);
virtual void Centre(int direction = wxBOTH);
virtual bool IsModal() const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
virtual int ShowModal();
virtual void EndModal(int retCode);
// Standard buttons
void OnOK(wxCommandEvent& event);
void OnApply(wxCommandEvent& event);
void OnCancel(wxCommandEvent& event);
// Responds to colour changes
void OnSysColourChanged(wxSysColourChangedEvent& event);
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
inline WXWidget GetTopWidget() const { return m_mainWidget; }
inline WXWidget GetClientWidget() const { return m_mainWidget; }
DECLARE_DYNAMIC_CLASS(wxDialog)
public:
//// Motif-specific
bool m_modalShowing;
wxString m_dialogTitle;
wxDialog();
DECLARE_EVENT_TABLE()
// Constructor with a modal flag, but no window id - the old convention
wxDialog(wxWindow *parent,
const wxString& title, bool modal,
int x = -1, int y= -1, int width = 500, int height = 500,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr)
{
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name);
}
// Constructor with no modal flag - the new convention.
wxDialog(wxWindow *parent, wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& title, // bool modal = FALSE, // TODO make this a window style?
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr);
~wxDialog();
virtual bool Destroy();
bool Show(bool show);
void Iconize(bool iconize);
void Raise();
void Lower();
virtual bool IsIconized() const;
void Fit();
void SetTitle(const wxString& title);
wxString GetTitle() const ;
// bool OnClose();
void OnCharHook(wxKeyEvent& event);
void OnCloseWindow(wxCloseEvent& event);
void SetModal(bool flag);
virtual void Centre(int direction = wxBOTH);
virtual bool IsModal() const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
virtual int ShowModal();
virtual void EndModal(int retCode);
// Standard buttons
void OnOK(wxCommandEvent& event);
void OnApply(wxCommandEvent& event);
void OnCancel(wxCommandEvent& event);
// Responds to colour changes
void OnSysColourChanged(wxSysColourChangedEvent& event);
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
inline WXWidget GetTopWidget() const { return m_mainWidget; }
inline WXWidget GetClientWidget() const { return m_mainWidget; }
public:
//// Motif-specific
bool m_modalShowing;
wxString m_dialogTitle;
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
private:
DECLARE_EVENT_TABLE()
};
#endif

View File

@@ -26,185 +26,179 @@ WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr;
class WXDLLEXPORT wxMenuBar;
class WXDLLEXPORT wxStatusBar;
class WXDLLEXPORT wxFrame: public wxWindow {
DECLARE_DYNAMIC_CLASS(wxFrame)
class WXDLLEXPORT wxFrame : public wxWindow
{
DECLARE_DYNAMIC_CLASS(wxFrame)
public:
wxFrame();
inline wxFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
wxFrame();
wxFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
~wxFrame();
~wxFrame();
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
virtual bool Destroy();
virtual bool Destroy();
void SetClientSize(int width, int height);
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
void SetClientSize(int width, int height);
void GetClientSize(int *width, int *height) const;
void GetSize(int *width, int *height) const ;
void GetPosition(int *x, int *y) const ;
void GetClientSize(int *width, int *height) const;
wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
void ClientToScreen(int *x, int *y) const;
wxPoint ClientToScreen(const wxPoint& pt) const { return wxWindow::ClientToScreen(pt); }
void GetSize(int *width, int *height) const ;
wxSize GetSize() const { return wxWindow::GetSize(); }
void ScreenToClient(int *x, int *y) const;
wxPoint ScreenToClient(const wxPoint& pt) const { return wxWindow::ScreenToClient(pt); }
void GetPosition(int *x, int *y) const ;
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
void OnSize(wxSizeEvent& event);
void OnMenuHighlight(wxMenuEvent& event);
void OnActivate(wxActivateEvent& event);
void OnIdle(wxIdleEvent& event);
void OnCloseWindow(wxCloseEvent& event);
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
bool Show(bool show);
void ClientToScreen(int *x, int *y) const;
wxPoint ClientToScreen(const wxPoint& pt) const { return wxWindow::ClientToScreen(pt); }
// Set menu bar
void SetMenuBar(wxMenuBar *menu_bar);
virtual wxMenuBar *GetMenuBar() const ;
void ScreenToClient(int *x, int *y) const;
wxPoint ScreenToClient(const wxPoint& pt) const { return wxWindow::ScreenToClient(pt); }
// Set title
void SetTitle(const wxString& title);
wxString GetTitle() const { return m_title; }
void OnSize(wxSizeEvent& event);
void OnMenuHighlight(wxMenuEvent& event);
void OnActivate(wxActivateEvent& event);
void OnIdle(wxIdleEvent& event);
void OnCloseWindow(wxCloseEvent& event);
void Centre(int direction = wxBOTH);
bool Show(bool show);
// Call this to simulate a menu command
virtual void Command(int id);
virtual void ProcessCommand(int id);
// Set menu bar
void SetMenuBar(wxMenuBar *menu_bar);
virtual wxMenuBar *GetMenuBar() const ;
// Set icon
virtual void SetIcon(const wxIcon& icon);
// Set title
void SetTitle(const wxString& title);
inline wxString GetTitle() const { return m_title; }
// Create status line
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
const wxString& name = "statusBar");
wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
virtual void PositionStatusBar();
virtual wxStatusBar *OnCreateStatusBar(int number, long style, wxWindowID id,
const wxString& name);
void Centre(int direction = wxBOTH);
// Call this to simulate a menu command
virtual void Command(int id);
virtual void ProcessCommand(int id);
// Set icon
virtual void SetIcon(const wxIcon& icon);
// Create status line
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
const wxString& name = "statusBar");
inline wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
virtual void PositionStatusBar();
virtual wxStatusBar *OnCreateStatusBar(int number, long style, wxWindowID id,
const wxString& name);
// Create toolbar
// Create toolbar
#if wxUSE_TOOLBAR
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxToolBarNameStr);
virtual wxToolBar *OnCreateToolBar(long style, wxWindowID id, const wxString& name);
// If made known to the frame, the frame will manage it automatically.
virtual void SetToolBar(wxToolBar *toolbar) ;
virtual wxToolBar *GetToolBar() const ;
virtual void PositionToolBar();
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxToolBarNameStr);
virtual wxToolBar *OnCreateToolBar(long style, wxWindowID id, const wxString& name);
// If made known to the frame, the frame will manage it automatically.
virtual void SetToolBar(wxToolBar *toolbar) ;
virtual wxToolBar *GetToolBar() const ;
virtual void PositionToolBar();
#endif // wxUSE_TOOLBAR
// Set status line text
virtual void SetStatusText(const wxString& text, int number = 0);
// Set status line text
virtual void SetStatusText(const wxString& text, int number = 0);
// Set status line widths
virtual void SetStatusWidths(int n, const int widths_field[]);
// Set status line widths
virtual void SetStatusWidths(int n, const int widths_field[]);
// Hint to tell framework which status bar to use
// TODO: should this go into a wxFrameworkSettings class perhaps?
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
static bool UsesNativeStatusBar() { return m_useNativeStatusBar; };
// Hint to tell framework which status bar to use
// TODO: should this go into a wxFrameworkSettings class perhaps?
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
static bool UsesNativeStatusBar() { return m_useNativeStatusBar; };
// Fit frame around subwindows
virtual void Fit();
// Fit frame around subwindows
virtual void Fit();
// Iconize
virtual void Iconize(bool iconize);
// Iconize
virtual void Iconize(bool iconize);
virtual bool IsIconized() const ;
virtual bool IsIconized() const ;
// Compatibility
inline bool Iconized() const { return IsIconized(); }
// Compatibility
bool Iconized() const { return IsIconized(); }
// Is the frame maximized? Returns FALSE under Motif (but TRUE for
// wxMDIChildFrame due to the tabbed implementation).
virtual bool IsMaximized(void) const ;
// Is the frame maximized? Returns FALSE under Motif (but TRUE for
// wxMDIChildFrame due to the tabbed implementation).
virtual bool IsMaximized(void) const ;
virtual void Maximize(bool maximize);
virtual void Maximize(bool maximize);
// Responds to colour changes
void OnSysColourChanged(wxSysColourChangedEvent& event);
// Responds to colour changes
void OnSysColourChanged(wxSysColourChangedEvent& event);
// Query app for menu item updates (called from OnIdle)
void DoMenuUpdates();
void DoMenuUpdates(wxMenu* menu);
// Query app for menu item updates (called from OnIdle)
void DoMenuUpdates();
void DoMenuUpdates(wxMenu* menu);
// Checks if there is a toolbar, and returns the first free client position
virtual wxPoint GetClientAreaOrigin() const;
// Checks if there is a toolbar, and returns the first free client position
virtual wxPoint GetClientAreaOrigin() const;
virtual void Raise();
virtual void Lower();
virtual void Raise();
virtual void Lower();
virtual void CaptureMouse();
virtual void ReleaseMouse();
virtual void CaptureMouse();
virtual void ReleaseMouse();
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetMenuBarWidget() const ;
inline WXWidget GetShellWidget() const { return m_frameShell; }
inline WXWidget GetWorkAreaWidget() const { return m_workArea; }
inline WXWidget GetClientAreaWidget() const { return m_clientArea; }
inline WXWidget GetTopWidget() const { return m_frameShell; }
inline WXWidget GetMainWindowWidget() const { return m_frameWidget; }
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetMenuBarWidget() const ;
WXWidget GetShellWidget() const { return m_frameShell; }
WXWidget GetWorkAreaWidget() const { return m_workArea; }
WXWidget GetClientAreaWidget() const { return m_clientArea; }
WXWidget GetTopWidget() const { return m_frameShell; }
WXWidget GetMainWindowWidget() const { return m_frameWidget; }
// The widget that can have children on it
WXWidget GetClientWidget() const;
bool GetVisibleStatus() const { return m_visibleStatus; }
// The widget that can have children on it
WXWidget GetClientWidget() const;
bool GetVisibleStatus() const { return m_visibleStatus; }
bool PreResize();
bool PreResize();
protected:
wxMenuBar * m_frameMenuBar;
wxStatusBar * m_frameStatusBar;
wxIcon m_icon;
bool m_iconized;
static bool m_useNativeStatusBar;
wxMenuBar * m_frameMenuBar;
wxStatusBar * m_frameStatusBar;
wxIcon m_icon;
bool m_iconized;
static bool m_useNativeStatusBar;
#if wxUSE_TOOLBAR
wxToolBar * m_frameToolBar ;
wxToolBar * m_frameToolBar ;
#endif // wxUSE_TOOLBAR
//// Motif-specific
//// Motif-specific
WXWidget m_frameShell;
WXWidget m_frameWidget;
WXWidget m_workArea;
WXWidget m_clientArea;
// WXWidget m_menuBarWidget;
bool m_visibleStatus;
wxString m_title;
WXWidget m_frameShell;
WXWidget m_frameWidget;
WXWidget m_workArea;
WXWidget m_clientArea;
// WXWidget m_menuBarWidget;
bool m_visibleStatus;
wxString m_title;
DECLARE_EVENT_TABLE()
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
private:
DECLARE_EVENT_TABLE()
};
#endif

View File

@@ -21,57 +21,52 @@
WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
// Group box
class WXDLLEXPORT wxGauge: public wxControl
class WXDLLEXPORT wxGauge : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxGauge)
public:
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
DECLARE_DYNAMIC_CLASS(wxGauge)
inline wxGauge(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr)
{
Create(parent, id, range, pos, size, style, validator, name);
}
public:
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
bool Create(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr);
inline wxGauge(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr)
{
Create(parent, id, range, pos, size, style, validator, name);
}
void SetShadowWidth(int w);
void SetBezelFace(int w);
void SetRange(int r);
void SetValue(int pos);
bool Create(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr);
int GetShadowWidth() const ;
int GetBezelFace() const ;
int GetRange() const ;
int GetValue() const ;
void SetShadowWidth(int w);
void SetBezelFace(int w);
void SetRange(int r);
void SetValue(int pos);
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
int GetShadowWidth() const ;
int GetBezelFace() const ;
int GetRange() const ;
int GetValue() const ;
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
protected:
int m_rangeMax;
int m_gaugePos;
protected:
int m_rangeMax;
int m_gaugePos;
};
#endif

View File

@@ -28,86 +28,84 @@ WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
// List box item
class WXDLLEXPORT wxListBox: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxListBox)
public:
DECLARE_DYNAMIC_CLASS(wxListBox)
wxListBox();
inline wxListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr):
m_clientDataList(wxKEY_INTEGER)
{
Create(parent, id, pos, size, n, choices, style, validator, name);
}
public:
wxListBox();
wxListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr):
m_clientDataList(wxKEY_INTEGER)
{
Create(parent, id, pos, size, n, choices, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
~wxListBox();
~wxListBox();
virtual void Append(const wxString& item);
virtual void Append(const wxString& item, char *clientData);
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
virtual int FindString(const wxString& s) const ;
virtual void Clear();
virtual void SetSelection(int n, bool select = TRUE);
virtual void Append(const wxString& item);
virtual void Append(const wxString& item, char *clientData);
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
virtual int FindString(const wxString& s) const ;
virtual void Clear();
virtual void SetSelection(int n, bool select = TRUE);
virtual void Deselect(int n);
virtual void Deselect(int n);
// For single choice list item only
virtual int GetSelection() const ;
virtual void Delete(int n);
virtual char *GetClientData(int n) const ;
virtual void *GetClientData() { return wxWindow::GetClientData(); }
virtual void SetClientData(int n, char *clientData);
virtual void SetClientData( void *data ) { wxWindow::SetClientData(data); }
virtual void SetString(int n, const wxString& s);
// For single choice list item only
virtual int GetSelection() const ;
virtual void Delete(int n);
virtual char *GetClientData(int n) const ;
virtual void *GetClientData() { return wxWindow::GetClientData(); }
virtual void SetClientData(int n, char *clientData);
virtual void SetClientData( void *data ) { wxWindow::SetClientData(data); }
virtual void SetString(int n, const wxString& s);
// For single or multiple choice list item
virtual int GetSelections(wxArrayInt& aSelections) const;
virtual bool Selected(int n) const ;
virtual wxString GetString(int n) const ;
// For single or multiple choice list item
virtual int GetSelections(wxArrayInt& aSelections) const;
virtual bool Selected(int n) const ;
virtual wxString GetString(int n) const ;
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
// Set the specified item at the first visible item
// or scroll to max range.
virtual void SetFirstItem(int n) ;
virtual void SetFirstItem(const wxString& s) ;
// Set the specified item at the first visible item
// or scroll to max range.
virtual void SetFirstItem(int n) ;
virtual void SetFirstItem(const wxString& s) ;
virtual void InsertItems(int nItems, const wxString items[], int pos);
virtual void InsertItems(int nItems, const wxString items[], int pos);
virtual wxString GetStringSelection() const ;
virtual bool SetStringSelection(const wxString& s, bool flag = TRUE);
virtual int Number() const ;
virtual wxString GetStringSelection() const ;
virtual bool SetStringSelection(const wxString& s, bool flag = TRUE);
virtual int Number() const ;
void Command(wxCommandEvent& event);
void Command(wxCommandEvent& event);
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetTopWidget() const;
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetTopWidget() const;
protected:
int m_noItems;
int m_selected;
int m_noItems;
int m_selected;
// List mapping positions->client data
wxList m_clientDataList;
// List mapping positions->client data
wxList m_clientDataList;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -117,91 +117,83 @@ DECLARE_EVENT_TABLE()
class WXDLLEXPORT wxMDIChildFrame: public wxFrame
{
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
public:
wxMDIChildFrame();
wxMDIChildFrame(wxMDIParentFrame *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
wxMDIChildFrame();
inline wxMDIChildFrame(wxMDIParentFrame *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
~wxMDIChildFrame();
~wxMDIChildFrame();
bool Create(wxMDIParentFrame *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
bool Create(wxMDIParentFrame *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
// Set menu bar
void SetMenuBar(wxMenuBar *menu_bar);
void SetTitle(const wxString& title);
// Set menu bar
void SetMenuBar(wxMenuBar *menu_bar);
void SetTitle(const wxString& title);
void SetClientSize(int width, int height);
void GetClientSize(int *width, int *height);
void GetSize(int *width, int *height) const;
void GetPosition(int *x, int *y) const ;
void SetClientSize(int width, int height);
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
// Set icon
virtual void SetIcon(const wxIcon& icon);
void GetClientSize(int *width, int *height) const;
wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
// Override wxFrame operations
void CaptureMouse();
void ReleaseMouse();
void Raise();
void Lower(void);
void SetSizeHints(int minW = -1, int minH = -1, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1);
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
// MDI operations
virtual void Maximize();
virtual void Maximize(bool WXUNUSED(maximize)) { };
inline void Minimize() { Iconize(TRUE); };
virtual void Iconize(bool iconize);
virtual void Restore();
virtual void Activate();
virtual bool IsIconized() const ;
void GetSize(int *width, int *height) const;
wxSize GetSize() const { return wxWindow::GetSize(); }
// Is the frame maximized? Returns TRUE for
// wxMDIChildFrame due to the tabbed implementation.
virtual bool IsMaximized(void) const ;
void GetPosition(int *x, int *y) const ;
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
bool Show(bool show);
// Set icon
virtual void SetIcon(const wxIcon& icon);
WXWidget GetMainWidget() const { return m_mainWidget; };
WXWidget GetTopWidget() const { return m_mainWidget; };
WXWidget GetClientWidget() const { return m_mainWidget; };
// Override wxFrame operations
void CaptureMouse();
void ReleaseMouse();
void Raise();
void Lower(void);
void SetSizeHints(int minW = -1, int minH = -1, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1);
/*
virtual void OnRaise();
virtual void OnLower();
*/
// MDI operations
virtual void Maximize();
virtual void Maximize(bool WXUNUSED(maximize)) { };
inline void Minimize() { Iconize(TRUE); };
virtual void Iconize(bool iconize);
virtual void Restore();
virtual void Activate();
virtual bool IsIconized() const ;
// Is the frame maximized? Returns TRUE for
// wxMDIChildFrame due to the tabbed implementation.
virtual bool IsMaximized(void) const ;
bool Show(bool show);
inline WXWidget GetMainWidget() const { return m_mainWidget; };
inline WXWidget GetTopWidget() const { return m_mainWidget; };
inline WXWidget GetClientWidget() const { return m_mainWidget; };
/*
virtual void OnRaise();
virtual void OnLower();
*/
inline void SetMDIParentFrame(wxMDIParentFrame* parentFrame) { m_mdiParentFrame = parentFrame; }
inline wxMDIParentFrame* GetMDIParentFrame() const { return m_mdiParentFrame; }
void SetMDIParentFrame(wxMDIParentFrame* parentFrame) { m_mdiParentFrame = parentFrame; }
wxMDIParentFrame* GetMDIParentFrame() const { return m_mdiParentFrame; }
protected:
wxMDIParentFrame* m_mdiParentFrame;
wxMDIParentFrame* m_mdiParentFrame;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
};
/* The client window is a child of the parent MDI frame, and itself
@@ -213,47 +205,38 @@ protected:
class WXDLLEXPORT wxMDIClientWindow: public wxNotebook
{
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
public:
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
wxMDIClientWindow() ;
inline wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0)
{
CreateClient(parent, style);
}
public:
wxMDIClientWindow() ;
wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0)
{
CreateClient(parent, style);
}
~wxMDIClientWindow();
~wxMDIClientWindow();
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
void GetClientSize(int *width, int *height) const;
void GetSize(int *width, int *height) const ;
void GetPosition(int *x, int *y) const ;
void SetClientSize(int width, int height);
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
// Note: this is virtual, to allow overridden behaviour.
virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
void GetClientSize(int *width, int *height) const;
wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
// Explicitly call default scroll behaviour
void OnScroll(wxScrollEvent& event);
void GetSize(int *width, int *height) const ;
wxSize GetSize() const { return wxWindow::GetSize(); }
void GetPosition(int *x, int *y) const ;
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
// Note: this is virtual, to allow overridden behaviour.
virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
// Explicitly call default scroll behaviour
void OnScroll(wxScrollEvent& event);
// Implementation
void OnPageChanged(wxNotebookEvent& event);
// Implementation
void OnPageChanged(wxNotebookEvent& event);
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
DECLARE_EVENT_TABLE()
private:
DECLARE_EVENT_TABLE()
};
#endif

View File

@@ -23,77 +23,77 @@ WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr;
// List box item
class WXDLLEXPORT wxBitmap ;
class WXDLLEXPORT wxRadioBox: public wxControl
class WXDLLEXPORT wxRadioBox : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxRadioBox)
DECLARE_DYNAMIC_CLASS(wxRadioBox)
public:
wxRadioBox();
wxRadioBox();
inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
{
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
}
wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
{
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
}
~wxRadioBox();
~wxRadioBox();
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
int FindString(const wxString& s) const;
void SetSelection(int N);
int GetSelection() const;
wxString GetString(int N) const;
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
int FindString(const wxString& s) const;
void SetSelection(int N);
int GetSelection() const;
wxString GetString(int N) const;
void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
void SetLabel(int item, const wxString& label) ;
wxString GetLabel(int item) const;
wxString GetLabel() const { return wxControl::GetLabel(); };
void Enable(bool enable);
void Enable(int item, bool enable);
void Show(int item, bool show) ;
bool Show(bool show) ;
void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
void SetLabel(int item, const wxString& label) ;
wxString GetLabel(int item) const;
wxString GetLabel() const { return wxControl::GetLabel(); };
void Enable(bool enable);
void Enable(int item, bool enable);
void Show(int item, bool show) ;
bool Show(bool show) ;
virtual wxString GetStringSelection() const;
virtual bool SetStringSelection(const wxString& s);
inline virtual int Number() const { return m_noItems; } ;
void Command(wxCommandEvent& event);
inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
virtual wxString GetStringSelection() const;
virtual bool SetStringSelection(const wxString& s);
virtual int Number() const { return m_noItems; } ;
void Command(wxCommandEvent& event);
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetTopWidget() const { return m_formWidget; }
WXWidget GetLabelWidget() const { return m_labelWidget; }
WXWidget GetFrameWidget() const { return m_frameWidget; }
inline WXWidget* GetRadioButtons() const { return m_radioButtons; }
inline void SetSel(int i) { m_selectedButton = i; }
int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetTopWidget() const { return m_formWidget; }
WXWidget GetLabelWidget() const { return m_labelWidget; }
WXWidget GetFrameWidget() const { return m_frameWidget; }
inline WXWidget* GetRadioButtons() const { return m_radioButtons; }
inline void SetSel(int i) { m_selectedButton = i; }
protected:
int m_majorDim ;
int m_noItems;
int m_noRowsOrCols;
int m_selectedButton;
int m_majorDim ;
int m_noItems;
int m_noRowsOrCols;
int m_selectedButton;
WXWidget m_formWidget;
WXWidget m_labelWidget;
WXWidget m_frameWidget;
WXWidget* m_radioButtons;
wxString* m_radioButtonLabels;
WXWidget m_formWidget;
WXWidget m_labelWidget;
WXWidget m_frameWidget;
WXWidget* m_radioButtons;
wxString* m_radioButtonLabels;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -23,78 +23,78 @@ WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
// Slider
class WXDLLEXPORT wxSlider: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxSlider)
DECLARE_DYNAMIC_CLASS(wxSlider)
public:
wxSlider();
wxSlider();
inline wxSlider(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr)
{
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
}
wxSlider(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr)
{
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
}
~wxSlider();
~wxSlider();
bool Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr);
bool Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr);
virtual int GetValue() const ;
virtual void SetValue(int);
void GetSize(int *x, int *y) const ;
wxSize GetSize() const { return wxWindow::GetSize(); }
virtual int GetValue() const ;
virtual void SetValue(int);
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
void GetSize(int *x, int *y) const ;
void SetRange(int minValue, int maxValue);
void SetRange(int minValue, int maxValue);
inline int GetMin() const { return m_rangeMin; }
inline int GetMax() const { return m_rangeMax; }
inline int GetMin() const { return m_rangeMin; }
inline int GetMax() const { return m_rangeMax; }
// For trackbars only
void SetTickFreq(int n, int pos);
inline int GetTickFreq() const { return m_tickFreq; }
void SetPageSize(int pageSize);
int GetPageSize() const ;
void ClearSel() ;
void ClearTicks() ;
void SetLineSize(int lineSize);
int GetLineSize() const ;
int GetSelEnd() const ;
int GetSelStart() const ;
void SetSelection(int minPos, int maxPos);
void SetThumbLength(int len) ;
int GetThumbLength() const ;
void SetTick(int tickPos) ;
// For trackbars only
void SetTickFreq(int n, int pos);
inline int GetTickFreq() const { return m_tickFreq; }
void SetPageSize(int pageSize);
int GetPageSize() const ;
void ClearSel() ;
void ClearTicks() ;
void SetLineSize(int lineSize);
int GetLineSize() const ;
int GetSelEnd() const ;
int GetSelStart() const ;
void SetSelection(int minPos, int maxPos);
void SetThumbLength(int len) ;
int GetThumbLength() const ;
void SetTick(int tickPos) ;
void Command(wxCommandEvent& event);
void Command(wxCommandEvent& event);
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
protected:
int m_rangeMin;
int m_rangeMax;
int m_pageSize;
int m_lineSize;
int m_tickFreq;
DECLARE_EVENT_TABLE()
protected:
int m_rangeMin;
int m_rangeMax;
int m_pageSize;
int m_lineSize;
int m_tickFreq;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
private:
DECLARE_EVENT_TABLE()
};
#endif

View File

@@ -20,54 +20,48 @@
WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
class WXDLLEXPORT wxStaticBitmap: public wxControl
class WXDLLEXPORT wxStaticBitmap : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
public:
inline wxStaticBitmap() { }
~wxStaticBitmap();
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
inline wxStaticBitmap(wxWindow *parent, wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBitmapNameStr)
{
Create(parent, id, label, pos, size, style, name);
}
public:
wxStaticBitmap() { }
~wxStaticBitmap();
bool Create(wxWindow *parent, wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBitmapNameStr);
wxStaticBitmap(wxWindow *parent, wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBitmapNameStr)
{
Create(parent, id, label, pos, size, style, name);
}
virtual void SetBitmap(const wxBitmap& bitmap);
bool Create(wxWindow *parent, wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBitmapNameStr);
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
virtual void SetBitmap(const wxBitmap& bitmap);
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
// overriden base class virtuals
virtual bool AcceptsFocus() const { return FALSE; }
// overriden base class virtuals
virtual bool AcceptsFocus() const { return FALSE; }
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
protected:
wxBitmap m_messageBitmap;
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
protected:
wxBitmap m_messageBitmap;
};
#endif

View File

@@ -23,53 +23,52 @@ WXDLLEXPORT_DATA(extern const char*) wxStaticBoxNameStr;
// Group box
class WXDLLEXPORT wxStaticBox: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxStaticBox)
DECLARE_DYNAMIC_CLASS(wxStaticBox)
public:
wxStaticBox();
inline wxStaticBox(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr)
{
Create(parent, id, label, pos, size, style, name);
}
~wxStaticBox();
public:
wxStaticBox();
wxStaticBox(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr)
{
Create(parent, id, label, pos, size, style, name);
}
~wxStaticBox();
bool Create(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr);
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
void SetLabel(const wxString& label);
wxString GetLabel() const;
void SetLabel(const wxString& label);
wxString GetLabel() const;
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetTopWidget() const { return m_formWidget; }
WXWidget GetLabelWidget() const { return m_labelWidget; }
DECLARE_EVENT_TABLE()
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetTopWidget() const { return m_formWidget; }
WXWidget GetLabelWidget() const { return m_labelWidget; }
protected:
// Motif-specific
WXWidget m_formWidget;
WXWidget m_labelWidget;
// Motif-specific
WXWidget m_formWidget;
WXWidget m_labelWidget;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
private:
DECLARE_EVENT_TABLE()
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -22,38 +22,39 @@
WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
// Pushbutton
class WXDLLEXPORT wxButton: public wxControl
class WXDLLEXPORT wxButton : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxButton)
public:
inline wxButton(void) {}
inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
DECLARE_DYNAMIC_CLASS(wxButton)
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
public:
wxButton() { }
wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual void SetDefault(void);
virtual void SetLabel(const wxString& label);
virtual wxString GetLabel(void) const ;
virtual void Command(wxCommandEvent& event);
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual void SetDefault();
virtual void SetLabel(const wxString& label);
virtual wxString GetLabel() const ;
virtual void Command(wxCommandEvent& event);
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -22,71 +22,75 @@ WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
// Checkbox item (single checkbox)
class WXDLLEXPORT wxBitmap;
class WXDLLEXPORT wxCheckBox: public wxControl
class WXDLLEXPORT wxCheckBox : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxCheckBox)
DECLARE_DYNAMIC_CLASS(wxCheckBox)
public:
inline wxCheckBox(void) { }
inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
public:
wxCheckBox() { }
wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
virtual void SetValue(bool);
virtual bool GetValue(void) const ;
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual void SetLabel(const wxString& label);
virtual void Command(wxCommandEvent& event);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual void SetValue(bool value);
virtual bool GetValue() const ;
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual void SetLabel(const wxString& label);
virtual void Command(wxCommandEvent& event);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
{
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
public:
int checkWidth ;
int checkHeight ;
public:
int checkWidth ;
int checkHeight ;
inline wxBitmapCheckBox(void) { checkWidth = -1; checkHeight = -1; }
inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
virtual void SetValue(bool);
virtual bool GetValue(void) const ;
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
virtual void SetLabel(const wxBitmap& bitmap);
virtual void SetValue(bool value);
virtual bool GetValue() const ;
virtual void SetLabel(const wxBitmap& bitmap);
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif
// _WX_CHECKBOX_H_

View File

@@ -23,60 +23,59 @@ WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
// Choice item
class WXDLLEXPORT wxChoice: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxChoice)
DECLARE_DYNAMIC_CLASS(wxChoice)
public:
inline wxChoice(void) { m_noStrings = 0; }
public:
wxChoice() { m_noStrings = 0; }
inline wxChoice(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr)
{
Create(parent, id, pos, size, n, choices, style, validator, name);
}
wxChoice(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr)
{
Create(parent, id, pos, size, n, choices, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr);
virtual void Append(const wxString& item);
virtual void Delete(int n);
virtual void Clear(void);
virtual int GetSelection(void) const ;
virtual void SetSelection(int n);
virtual int FindString(const wxString& s) const;
virtual wxString GetString(int n) const ;
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual wxString GetStringSelection(void) const ;
virtual bool SetStringSelection(const wxString& sel);
virtual void Append(const wxString& item);
virtual void Delete(int n);
virtual void Clear();
virtual int GetSelection() const ;
virtual void SetSelection(int n);
virtual int FindString(const wxString& s) const;
virtual wxString GetString(int n) const ;
virtual wxString GetStringSelection() const ;
virtual bool SetStringSelection(const wxString& sel);
virtual inline int Number(void) const { return m_noStrings; }
virtual void Command(wxCommandEvent& event);
virtual int Number() const { return m_noStrings; }
virtual void Command(wxCommandEvent& event);
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual inline void SetColumns(int WXUNUSED(n) = 1 ) { /* No effect */ } ;
virtual inline int GetColumns(void) const { return 1 ; };
virtual void SetColumns(int WXUNUSED(n) = 1 ) { /* No effect */ }
virtual int GetColumns() const { return 1 ; }
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
protected:
int m_noStrings;
int m_noStrings;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -56,23 +56,9 @@ public:
virtual bool Destroy();
void SetClientSize(int width, int height);
void SetClientSize(const wxSize& sz) { wxWindow::SetClientSize(sz); }
void GetClientSize(int *width, int *height) const;
wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
void GetSize(int *width, int *height) const ;
wxSize GetSize() const { return wxWindow::GetSize(); }
void GetPosition(int *x, int *y) const ;
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
virtual void ClientToScreen(int *x, int *y) const;
@@ -208,6 +194,11 @@ protected:
WXHWND m_hwndToolTip;
#endif // tooltips
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
private:
DECLARE_EVENT_TABLE()
};

View File

@@ -21,59 +21,59 @@
WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
// Group box
class WXDLLEXPORT wxGauge95: public wxControl
class WXDLLEXPORT wxGauge95 : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxGauge95)
public:
inline wxGauge95(void) { m_rangeMax = 0; m_gaugePos = 0; }
DECLARE_DYNAMIC_CLASS(wxGauge95)
inline wxGauge95(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr)
{
Create(parent, id, range, pos, size, style, validator, name);
}
public:
wxGauge95(void) { m_rangeMax = 0; m_gaugePos = 0; }
bool Create(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr);
wxGauge95(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr)
{
Create(parent, id, range, pos, size, style, validator, name);
}
void SetShadowWidth(int w);
void SetBezelFace(int w);
void SetRange(int r);
void SetValue(int pos);
bool Create(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr);
int GetShadowWidth(void) const ;
int GetBezelFace(void) const ;
int GetRange(void) const ;
int GetValue(void) const ;
void SetShadowWidth(int w);
void SetBezelFace(int w);
void SetRange(int r);
void SetValue(int pos);
void SetForegroundColour(const wxColour& col);
void SetBackgroundColour(const wxColour& col);
int GetShadowWidth(void) const ;
int GetBezelFace(void) const ;
int GetRange(void) const ;
int GetValue(void) const ;
// Backward compatibility
void SetForegroundColour(const wxColour& col);
void SetBackgroundColour(const wxColour& col);
// Backward compatibility
#if WXWIN_COMPATIBILITY
inline void SetButtonColour(const wxColour& col) { SetForegroundColour(col); }
void SetButtonColour(const wxColour& col) { SetForegroundColour(col); }
#endif
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
protected:
int m_rangeMax;
int m_gaugePos;
protected:
int m_rangeMax;
int m_gaugePos;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -23,57 +23,57 @@ WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
// Group box
class WXDLLEXPORT wxGaugeMSW: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxGaugeMSW)
public:
inline wxGaugeMSW(void) { m_rangeMax = 0; m_gaugePos = 0; }
DECLARE_DYNAMIC_CLASS(wxGaugeMSW)
inline wxGaugeMSW(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr)
{
Create(parent, id, range, pos, size, style, validator, name);
}
public:
wxGaugeMSW(void) { m_rangeMax = 0; m_gaugePos = 0; }
bool Create(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr);
wxGaugeMSW(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr)
{
Create(parent, id, range, pos, size, style, validator, name);
}
void SetShadowWidth(int w);
void SetBezelFace(int w);
void SetRange(int r);
void SetValue(int pos);
bool Create(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr);
int GetShadowWidth(void) const ;
int GetBezelFace(void) const ;
int GetRange(void) const ;
int GetValue(void) const ;
void SetShadowWidth(int w);
void SetBezelFace(int w);
void SetRange(int r);
void SetValue(int pos);
void SetForegroundColour(const wxColour& col);
void SetBackgroundColour(const wxColour& col);
int GetShadowWidth(void) const ;
int GetBezelFace(void) const ;
int GetRange(void) const ;
int GetValue(void) const ;
// Backward compatibility
void SetForegroundColour(const wxColour& col);
void SetBackgroundColour(const wxColour& col);
// Backward compatibility
#if WXWIN_COMPATIBILITY
inline void SetButtonColour(const wxColour& col) { SetForegroundColour(col); }
void SetButtonColour(const wxColour& col) { SetForegroundColour(col); }
#endif
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
protected:
int m_rangeMax;
int m_gaugePos;
protected:
int m_rangeMax;
int m_gaugePos;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -40,105 +40,104 @@ class wxArrayInt;
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
// List box item
class WXDLLEXPORT wxListBox: public wxControl
class WXDLLEXPORT wxListBox : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxListBox)
public:
DECLARE_DYNAMIC_CLASS(wxListBox)
wxListBox(void);
inline wxListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr)
{
Create(parent, id, pos, size, n, choices, style, validator, name);
}
public:
wxListBox();
wxListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr)
{
Create(parent, id, pos, size, n, choices, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
~wxListBox();
~wxListBox();
bool MSWCommand(WXUINT param, WXWORD id);
bool MSWCommand(WXUINT param, WXWORD id);
#if wxUSE_OWNER_DRAWN
bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
// plug-in for derived classes
virtual wxOwnerDrawn *CreateItem(size_t n);
// plug-in for derived classes
virtual wxOwnerDrawn *CreateItem(size_t n);
// allows to get the item and use SetXXX functions to set it's appearance
wxOwnerDrawn *GetItem(size_t n) const { return m_aItems[n]; }
#endif
// allows to get the item and use SetXXX functions to set it's appearance
wxOwnerDrawn *GetItem(size_t n) const { return m_aItems[n]; }
#endif // wxUSE_OWNER_DRAWN
virtual void Append(const wxString& item);
virtual void Append(const wxString& item, char *clientData);
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
virtual int FindString(const wxString& s) const ;
virtual void Clear(void);
virtual void SetSelection(int n, bool select = TRUE);
virtual void Append(const wxString& item);
virtual void Append(const wxString& item, char *clientData);
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
virtual int FindString(const wxString& s) const ;
virtual void Clear();
virtual void SetSelection(int n, bool select = TRUE);
virtual void Deselect(int n);
virtual void Deselect(int n);
// For single choice list item only
virtual int GetSelection() const ;
virtual void Delete(int n);
virtual char *GetClientData(int n) const ;
virtual void SetClientData(int n, char *clientData);
virtual void SetString(int n, const wxString& s);
// For single choice list item only
virtual int GetSelection() const ;
virtual void Delete(int n);
virtual char *GetClientData(int n) const ;
virtual void SetClientData(int n, char *clientData);
virtual void SetString(int n, const wxString& s);
// For single or multiple choice list item
virtual int GetSelections(wxArrayInt& aSelections) const;
virtual bool Selected(int n) const ;
virtual wxString GetString(int n) const ;
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
// For single or multiple choice list item
virtual int GetSelections(wxArrayInt& aSelections) const;
virtual bool Selected(int n) const ;
virtual wxString GetString(int n) const ;
// Set the specified item at the first visible item
// or scroll to max range.
virtual void SetFirstItem(int n) ;
virtual void SetFirstItem(const wxString& s) ;
// Set the specified item at the first visible item
// or scroll to max range.
virtual void SetFirstItem(int n) ;
virtual void SetFirstItem(const wxString& s) ;
virtual void InsertItems(int nItems, const wxString items[], int pos);
virtual void InsertItems(int nItems, const wxString items[], int pos);
virtual wxString GetStringSelection(void) const ;
virtual bool SetStringSelection(const wxString& s, bool flag = TRUE);
virtual int Number(void) const ;
virtual wxString GetStringSelection() const ;
virtual bool SetStringSelection(const wxString& s, bool flag = TRUE);
virtual int Number() const ;
void Command(wxCommandEvent& event);
void Command(wxCommandEvent& event);
// Windows-specific code to set the horizontal extent of
// the listbox, if necessary. If s is non-NULL, it's
// used to calculate the horizontal extent.
// Otherwise, all strings are used.
virtual void SetHorizontalExtent(const wxString& s = wxEmptyString);
// Windows-specific code to set the horizontal extent of
// the listbox, if necessary. If s is non-NULL, it's
// used to calculate the horizontal extent.
// Otherwise, all strings are used.
virtual void SetHorizontalExtent(const wxString& s = wxEmptyString);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
virtual void SetupColours(void);
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
virtual void SetupColours();
protected:
int m_noItems;
int m_selected;
protected:
int m_noItems;
int m_selected;
#if wxUSE_OWNER_DRAWN
// control items
wxListBoxItemsArray m_aItems;
// control items
wxListBoxItemsArray m_aItems;
#endif
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -84,8 +84,8 @@ typedef signed short int SHORT ;
#endif
#if wxUSE_PENWIN
WXDLLEXPORT void wxRegisterPenWin(void);
WXDLLEXPORT void wxCleanUpPenWin(void);
WXDLLEXPORT void wxRegisterPenWin();
WXDLLEXPORT void wxCleanUpPenWin();
WXDLLEXPORT void wxEnablePenAppHooks (bool hook);
#endif
@@ -106,7 +106,7 @@ VOID WINAPI ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) ;
* - NULL any extra child window pointers not created for this item
* (e.g. label control that wasn't needed)
* - delete any extra child windows in the destructor (e.g. label control)
* - implement GetSize and SetSize
* - implement DoSetSize
* - to find panel position if coordinates are (-1, -1), use GetPosition
* - call AdvanceCursor after creation, for panel layout mechanism.
*

View File

@@ -23,125 +23,120 @@ WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr;
// List box item
class WXDLLEXPORT wxBitmap ;
class WXDLLEXPORT wxRadioBox: public wxControl
class WXDLLEXPORT wxRadioBox : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxRadioBox)
DECLARE_DYNAMIC_CLASS(wxRadioBox)
public:
wxRadioBox(void);
wxRadioBox();
#if WXWIN_COMPATIBILITY
wxRadioBox(wxWindow *parent, wxFunction func, const char *title,
int x = -1, int y = -1, int width = -1, int height = -1,
int n = 0, char **choices = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr);
wxRadioBox(wxWindow *parent, wxFunction func, const char *title,
int x = -1, int y = -1, int width = -1, int height = -1,
int n = 0, char **choices = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr);
/*
inline wxRadioBox(wxWindow *parent, wxFunction func, const char *title,
int x, int y, int width, int height,
int n, wxBitmap **choices,
int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr)
{
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), n, (const wxBitmap **)choices, majorDim, style,
wxDefaultValidator, name);
Callback(func);
}
*/
/*
inline wxRadioBox(wxWindow *parent, wxFunction func, const char *title,
int x, int y, int width, int height,
int n, wxBitmap **choices,
int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr)
{
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), n, (const wxBitmap **)choices, majorDim, style,
wxDefaultValidator, name);
Callback(func);
}
*/
#endif // WXWIN_COMPATIBILITY
#endif
wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
{
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
}
inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
{
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
}
/*
wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxBitmap *choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
{
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
}
*/
/*
wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxBitmap *choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
{
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
}
*/
~wxRadioBox();
~wxRadioBox(void);
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
/*
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxBitmap *choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
*/
/*
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxBitmap *choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
*/
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
int FindString(const wxString& s) const;
void SetSelection(int N);
int GetSelection() const;
wxString GetString(int N) const;
int FindString(const wxString& s) const;
void SetSelection(int N);
int GetSelection(void) const;
wxString GetString(int N) const;
void GetSize(int *x, int *y) const;
void GetPosition(int *x, int *y) const;
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
wxString GetLabel() const;
void SetLabel(const wxString& label);
void SetLabel(int item, const wxString& label) ;
void SetLabel(int item, wxBitmap *bitmap) ;
wxString GetLabel(int item) const;
bool Show(bool show);
void SetFocus();
void Enable(bool enable);
void Enable(int item, bool enable);
void Show(int item, bool show) ;
void SetLabelFont(const wxFont& WXUNUSED(font)) {};
void SetButtonFont(const wxFont& font) { SetFont(font); }
void GetSize(int *x, int *y) const;
wxSize GetSize() const { return wxWindow::GetSize(); }
virtual wxString GetStringSelection() const;
virtual bool SetStringSelection(const wxString& s);
virtual int Number() const { return m_noItems; } ;
void Command(wxCommandEvent& event);
void GetPosition(int *x, int *y) const;
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
wxString GetLabel(void) const;
void SetLabel(const wxString& label);
void SetLabel(int item, const wxString& label) ;
void SetLabel(int item, wxBitmap *bitmap) ;
wxString GetLabel(int item) const;
bool Show(bool show);
void SetFocus(void);
void Enable(bool enable);
void Enable(int item, bool enable);
void Show(int item, bool show) ;
inline void SetLabelFont(const wxFont& WXUNUSED(font)) {};
inline void SetButtonFont(const wxFont& font) { SetFont(font); }
// Implementation
WXHWND *GetRadioButtons() const { return m_radioButtons; }
bool ContainsHWND(WXHWND hWnd) const ;
virtual wxString GetStringSelection(void) const;
virtual bool SetStringSelection(const wxString& s);
inline virtual int Number(void) const { return m_noItems; } ;
void Command(wxCommandEvent& event);
inline int GetNumberOfRowsOrCols(void) const { return m_noRowsOrCols; }
inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
// Implementation
inline WXHWND *GetRadioButtons(void) const { return m_radioButtons; }
bool ContainsHWND(WXHWND hWnd) const ;
long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
protected:
WXHWND * m_radioButtons;
int m_majorDim ;
int * m_radioWidth ; // for bitmaps
int * m_radioHeight ;
WXHWND * m_radioButtons;
int m_majorDim ;
int * m_radioWidth ; // for bitmaps
int * m_radioHeight ;
int m_noItems;
int m_noRowsOrCols;
int m_selectedButton;
int m_noItems;
int m_noRowsOrCols;
int m_selectedButton;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -21,92 +21,88 @@
WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
// Slider
class WXDLLEXPORT wxSlider95: public wxControl
class WXDLLEXPORT wxSlider95 : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxSlider95)
DECLARE_DYNAMIC_CLASS(wxSlider95)
public:
wxSlider95(void);
wxSlider95();
inline wxSlider95(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr)
{
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
}
wxSlider95(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr)
{
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
}
~wxSlider95(void);
~wxSlider95();
bool Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr);
bool Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr);
virtual int GetValue(void) const ;
virtual void SetValue(int);
virtual int GetValue() const ;
virtual void SetValue(int);
void GetSize(int *x, int *y) const ;
wxSize GetSize() const { return wxWindow::GetSize(); }
void GetSize(int *x, int *y) const ;
void GetPosition(int *x, int *y) const ;
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
bool Show(bool show);
void GetPosition(int *x, int *y) const ;
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
void SetRange(int minValue, int maxValue);
bool Show(bool show);
int GetMin() const { return m_rangeMin; }
int GetMax() const { return m_rangeMax; }
void SetRange(int minValue, int maxValue);
// For trackbars only
void SetTickFreq(int n, int pos);
int GetTickFreq() const { return m_tickFreq; }
void SetPageSize(int pageSize);
int GetPageSize() const ;
void ClearSel() ;
void ClearTicks() ;
void SetLineSize(int lineSize);
int GetLineSize() const ;
int GetSelEnd() const ;
int GetSelStart() const ;
void SetSelection(int minPos, int maxPos);
void SetThumbLength(int len) ;
int GetThumbLength() const ;
void SetTick(int tickPos) ;
inline int GetMin(void) const { return m_rangeMin; }
inline int GetMax(void) const { return m_rangeMax; }
// IMPLEMENTATION
WXHWND GetStaticMin() const { return m_staticMin; }
WXHWND GetStaticMax() const { return m_staticMax; }
WXHWND GetEditValue() const { return m_staticValue; }
virtual bool ContainsHWND(WXHWND hWnd) const;
// For trackbars only
void SetTickFreq(int n, int pos);
inline int GetTickFreq(void) const { return m_tickFreq; }
void SetPageSize(int pageSize);
int GetPageSize(void) const ;
void ClearSel(void) ;
void ClearTicks(void) ;
void SetLineSize(int lineSize);
int GetLineSize(void) const ;
int GetSelEnd(void) const ;
int GetSelStart(void) const ;
void SetSelection(int minPos, int maxPos);
void SetThumbLength(int len) ;
int GetThumbLength(void) const ;
void SetTick(int tickPos) ;
void Command(wxCommandEvent& event);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control);
void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control);
// IMPLEMENTATION
inline WXHWND GetStaticMin() const { return m_staticMin; }
inline WXHWND GetStaticMax() const { return m_staticMax; }
inline WXHWND GetEditValue() const { return m_staticValue; }
virtual bool ContainsHWND(WXHWND hWnd) const;
protected:
WXHWND m_staticMin;
WXHWND m_staticMax;
WXHWND m_staticValue;
int m_rangeMin;
int m_rangeMax;
int m_pageSize;
int m_lineSize;
int m_tickFreq;
void Command(wxCommandEvent& event);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control);
void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control);
protected:
WXHWND m_staticMin;
WXHWND m_staticMax;
WXHWND m_staticValue;
int m_rangeMin;
int m_rangeMax;
int m_pageSize;
int m_lineSize;
int m_tickFreq;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -21,92 +21,88 @@
WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
// Slider
class WXDLLEXPORT wxSliderMSW: public wxControl
class WXDLLEXPORT wxSliderMSW : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxSliderMSW)
DECLARE_DYNAMIC_CLASS(wxSliderMSW)
public:
wxSliderMSW(void);
wxSliderMSW();
inline wxSliderMSW(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr)
{
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
}
wxSliderMSW(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr)
{
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
}
~wxSliderMSW(void);
~wxSliderMSW();
bool Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr);
bool Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr);
virtual int GetValue(void) const ;
virtual void SetValue(int);
virtual int GetValue() const ;
virtual void SetValue(int);
void GetSize(int *x, int *y) const ;
wxSize GetSize() const { return wxWindow::GetSize(); }
void GetSize(int *x, int *y) const ;
void GetPosition(int *x, int *y) const ;
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
bool Show(bool show);
void GetPosition(int *x, int *y) const ;
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
void SetRange(int minValue, int maxValue);
bool Show(bool show);
int GetMin() const { return m_rangeMin; }
int GetMax() const { return m_rangeMax; }
void SetRange(int minValue, int maxValue);
// For trackbars only
void SetTickFreq(int n, int pos);
int GetTickFreq() const { return m_tickFreq; }
void SetPageSize(int pageSize);
int GetPageSize() const ;
void ClearSel() ;
void ClearTicks() ;
void SetLineSize(int lineSize);
int GetLineSize() const ;
int GetSelEnd() const ;
int GetSelStart() const ;
void SetSelection(int minPos, int maxPos);
void SetThumbLength(int len) ;
int GetThumbLength() const ;
void SetTick(int tickPos) ;
inline int GetMin(void) const { return m_rangeMin; }
inline int GetMax(void) const { return m_rangeMax; }
// IMPLEMENTATION
WXHWND GetStaticMin() const { return m_staticMin; }
WXHWND GetStaticMax() const { return m_staticMax; }
WXHWND GetEditValue() const { return m_staticValue; }
virtual bool ContainsHWND(WXHWND hWnd) const;
// For trackbars only
void SetTickFreq(int n, int pos);
inline int GetTickFreq(void) const { return m_tickFreq; }
void SetPageSize(int pageSize);
int GetPageSize(void) const ;
void ClearSel(void) ;
void ClearTicks(void) ;
void SetLineSize(int lineSize);
int GetLineSize(void) const ;
int GetSelEnd(void) const ;
int GetSelStart(void) const ;
void SetSelection(int minPos, int maxPos);
void SetThumbLength(int len) ;
int GetThumbLength(void) const ;
void SetTick(int tickPos) ;
void Command(wxCommandEvent& event);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control);
void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control);
// IMPLEMENTATION
inline WXHWND GetStaticMin() const { return m_staticMin; }
inline WXHWND GetStaticMax() const { return m_staticMax; }
inline WXHWND GetEditValue() const { return m_staticValue; }
virtual bool ContainsHWND(WXHWND hWnd) const;
protected:
WXHWND m_staticMin;
WXHWND m_staticMax;
WXHWND m_staticValue;
int m_rangeMin;
int m_rangeMax;
int m_pageSize;
int m_lineSize;
int m_tickFreq;
void Command(wxCommandEvent& event);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control);
void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control);
protected:
WXHWND m_staticMin;
WXHWND m_staticMax;
WXHWND m_staticValue;
int m_rangeMin;
int m_rangeMax;
int m_pageSize;
int m_lineSize;
int m_tickFreq;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -22,7 +22,7 @@ WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
class WXDLLEXPORT wxStaticBitmap : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
public:
wxStaticBitmap() { }
@@ -49,12 +49,6 @@ public:
virtual void Command(wxCommandEvent& WXUNUSED(event)) { }
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) { }
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size)
{ wxWindow::SetSize(size); }
wxBitmap& GetBitmap(void) const { return (wxBitmap&) m_messageBitmap; }
// overriden base class virtuals
@@ -67,6 +61,9 @@ public:
protected:
wxBitmap m_messageBitmap;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -26,7 +26,7 @@ class WXDLLEXPORT wxStaticBox : public wxControl
DECLARE_DYNAMIC_CLASS(wxStaticBox)
public:
wxStaticBox() {}
wxStaticBox() { }
wxStaticBox(wxWindow *parent, wxWindowID id,
const wxString& label,
@@ -52,11 +52,6 @@ public:
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size)
{ wxWindow::SetSize(size); }
void SetLabel(const wxString& label);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
@@ -65,6 +60,11 @@ public:
// overriden base class virtuals
virtual bool AcceptsFocus() const { return FALSE; }
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
private:
DECLARE_EVENT_TABLE()
};

View File

@@ -45,11 +45,6 @@ public:
const wxString& name = wxStaticTextNameStr);
// accessors
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size)
{ wxWindow::SetSize(size); }
void SetLabel(const wxString& label);
// operations
@@ -63,6 +58,11 @@ public:
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif

View File

@@ -35,7 +35,7 @@ WXDLLEXPORT_DATA(extern const char*) wxTextCtrlNameStr;
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
// Single-line text item
class WXDLLEXPORT wxTextCtrl: public wxControl
class WXDLLEXPORT wxTextCtrl : public wxControl
// 16-bit Borland 4.0 doesn't seem to allow multiple inheritance with wxWindow and streambuf:
// it complains about deriving a huge class from the huge class streambuf. !!
@@ -53,121 +53,122 @@ class WXDLLEXPORT wxTextCtrl: public wxControl
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
public:
// creation
// --------
wxTextCtrl();
inline wxTextCtrl(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr)
// creation
// --------
wxTextCtrl();
wxTextCtrl(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr)
#ifndef NO_TEXT_WINDOW_STREAM
:streambuf()
:streambuf()
#endif
{
Create(parent, id, value, pos, size, style, validator, name);
}
{
Create(parent, id, value, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxTE_PROCESS_TAB,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxTE_PROCESS_TAB,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr);
// accessors
// ---------
virtual wxString GetValue() const ;
virtual void SetValue(const wxString& value);
// accessors
// ---------
virtual wxString GetValue() const ;
virtual void SetValue(const wxString& value);
virtual int GetLineLength(long lineNo) const;
virtual wxString GetLineText(long lineNo) const;
virtual int GetNumberOfLines() const;
virtual int GetLineLength(long lineNo) const;
virtual wxString GetLineText(long lineNo) const;
virtual int GetNumberOfLines() const;
// operations
// ----------
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
{ wxWindow::SetSize(rect, sizeFlags); }
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
// operations
// ----------
// Clipboard operations
virtual void Copy();
virtual void Cut();
virtual void Paste();
// Clipboard operations
virtual void Copy();
virtual void Cut();
virtual void Paste();
virtual void SetInsertionPoint(long pos);
virtual void SetInsertionPointEnd();
virtual long GetInsertionPoint() const ;
virtual long GetLastPosition() const ;
virtual void Replace(long from, long to, const wxString& value);
virtual void Remove(long from, long to);
virtual void SetSelection(long from, long to);
virtual void SetEditable(bool editable);
virtual void SetInsertionPoint(long pos);
virtual void SetInsertionPointEnd();
virtual long GetInsertionPoint() const ;
virtual long GetLastPosition() const ;
virtual void Replace(long from, long to, const wxString& value);
virtual void Remove(long from, long to);
virtual void SetSelection(long from, long to);
virtual void SetEditable(bool editable);
// streambuf implementation
// streambuf implementation
#ifndef NO_TEXT_WINDOW_STREAM
int overflow(int i);
int sync();
int underflow();
int overflow(int i);
int sync();
int underflow();
#endif
wxTextCtrl& operator<<(const wxString& s);
wxTextCtrl& operator<<(int i);
wxTextCtrl& operator<<(long i);
wxTextCtrl& operator<<(float f);
wxTextCtrl& operator<<(double d);
wxTextCtrl& operator<<(const char c);
wxTextCtrl& operator<<(const wxString& s);
wxTextCtrl& operator<<(int i);
wxTextCtrl& operator<<(long i);
wxTextCtrl& operator<<(float f);
wxTextCtrl& operator<<(double d);
wxTextCtrl& operator<<(const char c);
virtual bool LoadFile(const wxString& file);
virtual bool SaveFile(const wxString& file);
virtual void WriteText(const wxString& text);
virtual void AppendText(const wxString& text);
virtual void DiscardEdits();
virtual bool IsModified() const;
virtual bool LoadFile(const wxString& file);
virtual bool SaveFile(const wxString& file);
virtual void WriteText(const wxString& text);
virtual void AppendText(const wxString& text);
virtual void DiscardEdits();
virtual bool IsModified() const;
#if WXWIN_COMPATIBILITY
inline bool Modified() const { return IsModified(); }
inline bool Modified() const { return IsModified(); }
#endif
virtual long XYToPosition(long x, long y) const ;
virtual void PositionToXY(long pos, long *x, long *y) const ;
virtual void ShowPosition(long pos);
virtual void Clear();
virtual long XYToPosition(long x, long y) const ;
virtual void PositionToXY(long pos, long *x, long *y) const ;
virtual void ShowPosition(long pos);
virtual void Clear();
// callbacks
// ---------
void OnDropFiles(wxDropFilesEvent& event);
void OnChar(wxKeyEvent& event); // Process 'enter' if required
void OnEraseBackground(wxEraseEvent& event);
// callbacks
// ---------
void OnDropFiles(wxDropFilesEvent& event);
void OnChar(wxKeyEvent& event); // Process 'enter' if required
void OnEraseBackground(wxEraseEvent& event);
// Implementation
// --------------
virtual void Command(wxCommandEvent& event);
virtual bool MSWCommand(WXUINT param, WXWORD id);
// Implementation
// --------------
virtual void Command(wxCommandEvent& event);
virtual bool MSWCommand(WXUINT param, WXWORD id);
#if wxUSE_RICHEDIT
bool IsRich() const { return m_isRich; }
void SetRichEdit(bool isRich) { m_isRich = isRich; }
bool IsRich() const { return m_isRich; }
void SetRichEdit(bool isRich) { m_isRich = isRich; }
#endif
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam,
WXLPARAM lParam);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam,
WXLPARAM lParam);
virtual void AdoptAttributesFromHWND();
virtual void SetupColours();
virtual long MSWGetDlgCode();
virtual void AdoptAttributesFromHWND();
virtual void SetupColours();
virtual long MSWGetDlgCode();
protected:
#if wxUSE_RICHEDIT
bool m_isRich; // Are we using rich text edit to implement this?
bool m_isRich; // Are we using rich text edit to implement this?
#endif
wxString m_fileName;
wxString m_fileName;
DECLARE_EVENT_TABLE()
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
private:
DECLARE_EVENT_TABLE()
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -328,7 +328,6 @@ bool wxFTP::Abort(void)
wxInputStream *wxFTP::GetInputStream(const wxString& path)
{
wxString tmp_str;
size_t calc_size;
if (!SendCommand("TYPE I", '2'))
return NULL;

View File

@@ -1273,7 +1273,7 @@ void wxSizer::RemoveSizerChild(wxWindow *child)
GetChildren().DeleteObject(child);
}
void wxSizer::SetSize(int x, int y, int w, int h, int WXUNUSED(flags))
void wxSizer::DoSetSize(int x, int y, int w, int h, int WXUNUSED(flags))
{
wxLayoutConstraints *constr = GetConstraints();
if (x != -1)
@@ -1500,11 +1500,6 @@ wxRowColSizer::~wxRowColSizer()
{
}
void wxRowColSizer::SetSize(int x, int y, int w, int h, int flags)
{
wxSizer::SetSize(x, y, w, h, flags);
}
bool wxRowColSizer::LayoutPhase1(int *noChanges)
{
*noChanges = 0;

View File

@@ -994,10 +994,10 @@ void wxOnAssert(const char *szFile, int nLine, const char *szMsg)
// make life easier for people using VC++ IDE: clicking on the message will
// take us immediately to the place of the failed assert
#ifdef __VISUALC__
sprintf(szBuf, _("%s(%d): assert failed"), szFile, nLine);
sprintf(szBuf, "%s(%d): assert failed", szFile, nLine);
#else // !VC++
// make the error message more clear for all the others
sprintf(szBuf, _("Assert failed in file %s at line %d"), szFile, nLine);
sprintf(szBuf, "Assert failed in file %s at line %d", szFile, nLine);
#endif // VC/!VC
if ( szMsg != NULL ) {
@@ -1015,9 +1015,9 @@ void wxOnAssert(const char *szFile, int nLine, const char *szMsg)
#if wxUSE_NOGUI
Trap();
#else
strcat(szBuf, _("\nDo you want to stop the program?"
"\nYou can also choose [Cancel] to suppress "
"further warnings."));
strcat(szBuf, "\nDo you want to stop the program?"
"\nYou can also choose [Cancel] to suppress "
"further warnings.");
switch ( wxMessageBox(szBuf, _("Debug"),
wxYES_NO | wxCANCEL | wxICON_STOP ) ) {

View File

@@ -320,7 +320,7 @@ void wxObject::LoadObject( wxObjectInputStream& stream )
m_serialObj->LoadObject(stream);
}
#endif
#endif // wxUSE_SERIAL
/*
* wxObject: cloning of objects

View File

@@ -24,6 +24,7 @@
#include "wx/utils.h"
#include "wx/intl.h"
#include "wx/wx.h"
#include "wx/dynarray.h"
#endif
#ifndef __WIN16__

View File

@@ -290,7 +290,7 @@ void wxDialog::OnSize( wxSizeEvent &WXUNUSED(event) )
}
}
void wxDialog::SetSize( int x, int y, int width, int height, int sizeFlags )
void wxDialog::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
wxASSERT_MSG( (m_widget != NULL), "invalid dialog" );
wxASSERT_MSG( (m_wxwindow != NULL), "invalid dialog" );
@@ -350,11 +350,6 @@ void wxDialog::SetSize( int x, int y, int width, int height, int sizeFlags )
m_resizing = FALSE;
}
void wxDialog::SetSize( int width, int height )
{
SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING );
}
void wxDialog::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
{
// due to a bug in gtk, x,y are always 0

View File

@@ -46,11 +46,11 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
{
int style = dialog->GetStyle();
if ((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT))
{
char *filename = gtk_file_selection_get_filename(
GTK_FILE_SELECTION(dialog->m_widget) );
GtkFileSelection *filedlg = GTK_FILE_SELECTION(dialog->m_widget);
char *filename = gtk_file_selection_get_filename(filedlg);
if ( (style & wxSAVE) && ( style & wxOVERWRITE_PROMPT ) )
{
if (wxFileExists( filename ))
{
wxString msg;
@@ -61,10 +61,19 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
return;
}
}
else if ( (style & wxOPEN) && ( style & wxFILE_MUST_EXIST) )
{
if ( !wxFileExists( filename ) )
{
wxMessageBox(_("Please choose an existing file."), _("Error"), wxOK);
dialog->SetPath( gtk_file_selection_get_filename( GTK_FILE_SELECTION(dialog->m_widget) ) );
return;
}
}
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_OK);
dialog->SetPath( filename );
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
event.SetEventObject( dialog );
dialog->GetEventHandler()->ProcessEvent( event );
}
@@ -76,7 +85,7 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
static
void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(w), wxFileDialog *dialog )
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL);
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
event.SetEventObject( dialog );
dialog->GetEventHandler()->ProcessEvent( event );
}

View File

@@ -249,7 +249,7 @@ wxPoint wxFrame::GetClientAreaOrigin() const
return pt;
}
void wxFrame::SetSize( int x, int y, int width, int height, int sizeFlags )
void wxFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );
@@ -312,11 +312,6 @@ void wxFrame::SetSize( int x, int y, int width, int height, int sizeFlags )
m_resizing = FALSE;
}
void wxFrame::SetSize( int width, int height )
{
SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING );
}
void wxFrame::Centre( int direction )
{
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );
@@ -353,7 +348,7 @@ void wxFrame::GetClientSize( int *width, int *height ) const
}
}
void wxFrame::SetClientSize( int width, int height )
void wxFrame::DoSetClientSize( int width, int height )
{
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );

View File

@@ -9,7 +9,7 @@
#ifdef __GNUG__
#pragma implementation "window.h"
#pragma implementation "window.h"
#endif
#include "wx/defs.h"
@@ -21,12 +21,15 @@
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
#include "wx/dnd.h"
#endif
#if wxUSE_TOOLTIPS
#include "wx/tooltip.h"
#include "wx/tooltip.h"
#endif
#include "wx/menu.h"
#include "wx/statusbr.h"
#include "wx/intl.h"
@@ -1798,7 +1801,7 @@ void wxWindow::AdjustForParentClientOrigin( int& x, int& y, int sizeFlags )
}
}
void wxWindow::SetSize( int x, int y, int width, int height, int sizeFlags )
void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
wxASSERT_MSG( (m_widget != NULL), "invalid window" );
wxASSERT_MSG( (m_parent != NULL), "wxWindow::SetSize requires parent.\n" );
@@ -1883,16 +1886,6 @@ void wxWindow::OnInternalIdle()
UpdateWindowUI();
}
void wxWindow::SetSize( int width, int height )
{
SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING );
}
void wxWindow::Move( int x, int y )
{
SetSize( x, y, -1, -1, wxSIZE_USE_EXISTING );
}
void wxWindow::GetSize( int *width, int *height ) const
{
wxCHECK_RET( (m_widget != NULL), "invalid window" );
@@ -1901,7 +1894,7 @@ void wxWindow::GetSize( int *width, int *height ) const
if (height) (*height) = m_height;
}
void wxWindow::SetClientSize( int width, int height )
void wxWindow::DoSetClientSize( int width, int height )
{
wxCHECK_RET( (m_widget != NULL), "invalid window" );

View File

@@ -290,7 +290,7 @@ void wxDialog::OnSize( wxSizeEvent &WXUNUSED(event) )
}
}
void wxDialog::SetSize( int x, int y, int width, int height, int sizeFlags )
void wxDialog::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
wxASSERT_MSG( (m_widget != NULL), "invalid dialog" );
wxASSERT_MSG( (m_wxwindow != NULL), "invalid dialog" );
@@ -350,11 +350,6 @@ void wxDialog::SetSize( int x, int y, int width, int height, int sizeFlags )
m_resizing = FALSE;
}
void wxDialog::SetSize( int width, int height )
{
SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING );
}
void wxDialog::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
{
// due to a bug in gtk, x,y are always 0

View File

@@ -46,11 +46,11 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
{
int style = dialog->GetStyle();
if ((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT))
{
char *filename = gtk_file_selection_get_filename(
GTK_FILE_SELECTION(dialog->m_widget) );
GtkFileSelection *filedlg = GTK_FILE_SELECTION(dialog->m_widget);
char *filename = gtk_file_selection_get_filename(filedlg);
if ( (style & wxSAVE) && ( style & wxOVERWRITE_PROMPT ) )
{
if (wxFileExists( filename ))
{
wxString msg;
@@ -61,10 +61,19 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
return;
}
}
else if ( (style & wxOPEN) && ( style & wxFILE_MUST_EXIST) )
{
if ( !wxFileExists( filename ) )
{
wxMessageBox(_("Please choose an existing file."), _("Error"), wxOK);
dialog->SetPath( gtk_file_selection_get_filename( GTK_FILE_SELECTION(dialog->m_widget) ) );
return;
}
}
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_OK);
dialog->SetPath( filename );
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
event.SetEventObject( dialog );
dialog->GetEventHandler()->ProcessEvent( event );
}
@@ -76,7 +85,7 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
static
void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(w), wxFileDialog *dialog )
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL);
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
event.SetEventObject( dialog );
dialog->GetEventHandler()->ProcessEvent( event );
}

View File

@@ -249,7 +249,7 @@ wxPoint wxFrame::GetClientAreaOrigin() const
return pt;
}
void wxFrame::SetSize( int x, int y, int width, int height, int sizeFlags )
void wxFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );
@@ -312,11 +312,6 @@ void wxFrame::SetSize( int x, int y, int width, int height, int sizeFlags )
m_resizing = FALSE;
}
void wxFrame::SetSize( int width, int height )
{
SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING );
}
void wxFrame::Centre( int direction )
{
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );
@@ -353,7 +348,7 @@ void wxFrame::GetClientSize( int *width, int *height ) const
}
}
void wxFrame::SetClientSize( int width, int height )
void wxFrame::DoSetClientSize( int width, int height )
{
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );

View File

@@ -9,7 +9,7 @@
#ifdef __GNUG__
#pragma implementation "window.h"
#pragma implementation "window.h"
#endif
#include "wx/defs.h"
@@ -21,12 +21,15 @@
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
#include "wx/dnd.h"
#endif
#if wxUSE_TOOLTIPS
#include "wx/tooltip.h"
#include "wx/tooltip.h"
#endif
#include "wx/menu.h"
#include "wx/statusbr.h"
#include "wx/intl.h"
@@ -1798,7 +1801,7 @@ void wxWindow::AdjustForParentClientOrigin( int& x, int& y, int sizeFlags )
}
}
void wxWindow::SetSize( int x, int y, int width, int height, int sizeFlags )
void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
wxASSERT_MSG( (m_widget != NULL), "invalid window" );
wxASSERT_MSG( (m_parent != NULL), "wxWindow::SetSize requires parent.\n" );
@@ -1883,16 +1886,6 @@ void wxWindow::OnInternalIdle()
UpdateWindowUI();
}
void wxWindow::SetSize( int width, int height )
{
SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING );
}
void wxWindow::Move( int x, int y )
{
SetSize( x, y, -1, -1, wxSIZE_USE_EXISTING );
}
void wxWindow::GetSize( int *width, int *height ) const
{
wxCHECK_RET( (m_widget != NULL), "invalid window" );
@@ -1901,7 +1894,7 @@ void wxWindow::GetSize( int *width, int *height ) const
if (height) (*height) = m_height;
}
void wxWindow::SetClientSize( int width, int height )
void wxWindow::DoSetClientSize( int width, int height )
{
wxCHECK_RET( (m_widget != NULL), "invalid window" );

View File

@@ -123,7 +123,7 @@ void wxBitmapCheckBox::SetLabel(const wxBitmap& bitmap)
// TODO
}
void wxBitmapCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxBitmapCheckBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
// TODO
}

View File

@@ -349,7 +349,7 @@ void wxChoice::SetFocus()
XmProcessTraversal(XtParent((Widget)m_mainWidget), XmTRAVERSE_CURRENT);
}
void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxChoice::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_ANY, NULL);
bool managed = XtIsManaged((Widget) m_formWidget);
@@ -380,7 +380,7 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags)
XtManageChild ((Widget) m_formWidget);
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
wxControl::SetSize (x, y, width, height, sizeFlags);
wxControl::DoSetSize (x, y, width, height, sizeFlags);
}
wxString wxChoice::GetStringSelection () const

View File

@@ -102,10 +102,10 @@ wxComboBox::~wxComboBox()
m_mainWidget = (WXWidget) 0;
}
void wxComboBox::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxComboBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
// Necessary so it doesn't call wxChoice::SetSize
wxWindow::SetSize(x, y, width, height, sizeFlags);
wxWindow::DoSetSize(x, y, width, height, sizeFlags);
}
wxString wxComboBox::GetValue() const

View File

@@ -335,19 +335,13 @@ XtVaGetValues((Widget) m_mainWidget, XmNiconic, &iconic, NULL);
return FALSE;
}
void wxDialog::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxDialog::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
XtVaSetValues((Widget) m_mainWidget, XmNresizePolicy, XmRESIZE_ANY, NULL);
wxWindow::SetSize(x, y, width, height, sizeFlags);
wxWindow::DoSetSize(x, y, width, height, sizeFlags);
XtVaSetValues((Widget) m_mainWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
}
void wxDialog::SetClientSize(int width, int height)
{
SetSize(-1, -1, width, height);
}
void wxDialog::SetTitle(const wxString& title)
{
m_dialogTitle = title;

View File

@@ -412,7 +412,7 @@ void wxFrame::GetClientSize(int *x, int *y) const
// Set the client size (i.e. leave the calculation of borders etc.
// to wxWindows)
void wxFrame::SetClientSize(int width, int height)
void wxFrame::DoSetClientSize(int width, int height)
{
// Calculate how large the new main window should be
// by finding the difference between the client area and the
@@ -480,7 +480,7 @@ void wxFrame::GetPosition(int *x, int *y) const
if (y) *y = yy;
}
void wxFrame::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
if (x > -1)
XtVaSetValues((Widget) m_frameShell, XmNx, x, NULL);

View File

@@ -134,11 +134,6 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
return TRUE;
}
void wxGauge::SetSize(int x, int y, int width, int height, int sizeFlags)
{
wxControl::SetSize(x, y, width, height, sizeFlags);
}
void wxGauge::SetShadowWidth(int w)
{
if (w == 0)

View File

@@ -512,9 +512,9 @@ wxString wxListBox::GetString(int N) const
return wxEmptyString;
}
void wxListBox::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxListBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
wxWindow::SetSize(x, y, width, height, sizeFlags);
wxWindow::DoSetSize(x, y, width, height, sizeFlags);
// Check resulting size is correct
int tempW, tempH;

View File

@@ -109,12 +109,6 @@ wxMDIParentFrame::~wxMDIParentFrame()
m_clientWindow = NULL;
}
// Get size *available for subwindows* i.e. excluding menu bar.
void wxMDIParentFrame::GetClientSize(int *x, int *y) const
{
wxFrame::GetClientSize(x, y);
}
void wxMDIParentFrame::SetMenuBar(wxMenuBar *menu_bar)
{
m_frameMenuBar = menu_bar;
@@ -438,7 +432,7 @@ void wxMDIChildFrame::OnLower()
// to wxWindows)
void wxMDIChildFrame::SetClientSize(int width, int height)
{
wxWindow::SetClientSize(width, height);
wxWindow::DoSetClientSize(width, height);
}
void wxMDIChildFrame::GetClientSize(int* width, int* height) const
@@ -446,9 +440,9 @@ void wxMDIChildFrame::GetClientSize(int* width, int* height) const
wxWindow::GetSize(width, height);
}
void wxMDIChildFrame::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxMDIChildFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
wxWindow::SetSize(x, y, width, height, sizeFlags);
wxWindow::DoSetSize(x, y, width, height, sizeFlags);
}
void wxMDIChildFrame::GetSize(int* width, int* height) const
@@ -590,14 +584,14 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
return FALSE;
}
void wxMDIClientWindow::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxMDIClientWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
wxWindow::SetSize(x, y, width, height, sizeFlags);
wxWindow::DoSetSize(x, y, width, height, sizeFlags);
}
void wxMDIClientWindow::SetClientSize(int width, int height)
void wxMDIClientWindow::DoSetClientSize(int width, int height)
{
wxWindow::SetClientSize(width, height);
wxWindow::DoSetClientSize(width, height);
}
void wxMDIClientWindow::GetClientSize(int *width, int *height) const

View File

@@ -297,7 +297,7 @@ wxString wxRadioBox::GetString(int n) const
return m_radioButtonLabels[n];
}
void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
bool managed = XtIsManaged((Widget) m_formWidget);

View File

@@ -131,7 +131,7 @@ void wxSlider::GetSize(int *width, int *height) const
wxControl::GetSize(width, height);
}
void wxSlider::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxSlider::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
Widget widget = (Widget) m_mainWidget;

View File

@@ -82,11 +82,6 @@ wxStaticBitmap::~wxStaticBitmap()
SetBitmap(wxNullBitmap);
}
void wxStaticBitmap::SetSize(int x, int y, int width, int height, int sizeFlags)
{
wxControl::SetSize(x, y, width, height, sizeFlags);
}
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
{
m_messageBitmap = bitmap;

View File

@@ -182,9 +182,9 @@ wxString wxStaticBox::GetLabel() const
}
}
void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxStaticBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
wxControl::SetSize (x, y, width, height, sizeFlags);
wxControl::DoSetSize (x, y, width, height, sizeFlags);
if (m_labelWidget)
{

View File

@@ -96,7 +96,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
return TRUE;
}
void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxButton::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
GetPosition(&currentX, &currentY);

View File

@@ -118,7 +118,7 @@ void wxCheckBox::SetLabel(const wxString& label)
SetWindowText((HWND)GetHWND(), label);
}
void wxCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxCheckBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
GetPosition(&currentX, &currentY);
@@ -174,7 +174,7 @@ void wxCheckBox::SetValue(bool val)
#define BST_CHECKED 0x0001
#endif
bool wxCheckBox::GetValue(void) const
bool wxCheckBox::GetValue() const
{
#ifdef __WIN32__
return (SendMessage((HWND) GetHWND(), BM_GETCHECK, 0, 0) == BST_CHECKED);
@@ -275,7 +275,7 @@ void wxBitmapCheckBox::SetLabel(const wxBitmap& bitmap)
{
}
void wxBitmapCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxBitmapCheckBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
GetPosition(&currentX, &currentY);
@@ -307,7 +307,7 @@ void wxBitmapCheckBox::SetValue(bool val)
SendMessage((HWND) GetHWND(), BM_SETCHECK, val, 0);
}
bool wxBitmapCheckBox::GetValue(void) const
bool wxBitmapCheckBox::GetValue() const
{
return ((0x003 & SendMessage((HWND) GetHWND(), BM_GETCHECK, 0, 0)) == 0x003);
}

View File

@@ -180,7 +180,7 @@ wxString wxChoice::GetString(int n) const
return wxString(wxBuffer);
}
void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxChoice::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
GetPosition(&currentX, &currentY);

View File

@@ -68,7 +68,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
bool wxFrame::m_useNativeStatusBar = FALSE;
#endif
wxFrame::wxFrame(void)
wxFrame::wxFrame()
{
m_frameToolBar = NULL ;
m_frameMenuBar = NULL;
@@ -126,7 +126,7 @@ bool wxFrame::Create(wxWindow *parent,
return TRUE;
}
wxFrame::~wxFrame(void)
wxFrame::~wxFrame()
{
m_isBeingDeleted = TRUE;
wxTopLevelWindows.DeleteObject(this);
@@ -158,7 +158,7 @@ wxFrame::~wxFrame(void)
::BringWindowToTop((HWND) GetParent()->GetHWND());
}
WXHMENU wxFrame::GetWinMenu(void) const
WXHMENU wxFrame::GetWinMenu() const
{
return m_hMenu;
}
@@ -186,7 +186,7 @@ void wxFrame::GetClientSize(int *x, int *y) const
// Set the client size (i.e. leave the calculation of borders etc.
// to wxWindows)
void wxFrame::SetClientSize(int width, int height)
void wxFrame::DoSetClientSize(int width, int height)
{
HWND hWnd = (HWND) GetHWND();
@@ -244,7 +244,7 @@ void wxFrame::GetPosition(int *x, int *y) const
*y = point.y;
}
void wxFrame::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
int x1 = x;
@@ -329,14 +329,14 @@ void wxFrame::Maximize(bool maximize)
m_iconized = FALSE;
}
bool wxFrame::IsIconized(void) const
bool wxFrame::IsIconized() const
{
((wxFrame *)this)->m_iconized = (::IsIconic((HWND) GetHWND()) != 0);
return m_iconized;
}
// Is it maximized?
bool wxFrame::IsMaximized(void) const
bool wxFrame::IsMaximized() const
{
return (::IsZoomed((HWND) GetHWND()) != 0) ;
}
@@ -346,7 +346,7 @@ void wxFrame::SetTitle(const wxString& title)
SetWindowText((HWND) GetHWND(), (const char *)title);
}
wxString wxFrame::GetTitle(void) const
wxString wxFrame::GetTitle() const
{
GetWindowText((HWND) GetHWND(), wxBuffer, 1000);
return wxString(wxBuffer);
@@ -427,7 +427,7 @@ void wxFrame::SetStatusWidths(int n, const int widths_field[])
PositionStatusBar();
}
void wxFrame::PositionStatusBar(void)
void wxFrame::PositionStatusBar()
{
// native status bar positions itself
if (m_frameStatusBar
@@ -515,7 +515,7 @@ bool wxFrame::LoadAccelerators(const wxString& table)
}
#endif
void wxFrame::Fit(void)
void wxFrame::Fit()
{
// Work out max. size
wxNode *node = GetChildren().First();
@@ -633,7 +633,7 @@ void wxFrame::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow *
::PostMessage((HWND) GetHWND(), WM_SIZE, SIZE_RESTORED, MAKELPARAM(width, height));
}
bool wxFrame::MSWOnPaint(void)
bool wxFrame::MSWOnPaint()
{
RECT rect;
if (GetUpdateRect((HWND) GetHWND(), &rect, FALSE))
@@ -679,7 +679,7 @@ bool wxFrame::MSWOnPaint(void)
return 1;
}
WXHICON wxFrame::MSWOnQueryDragIcon(void)
WXHICON wxFrame::MSWOnQueryDragIcon()
{
if (m_icon.Ok() && (m_icon.GetHICON() != 0))
return m_icon.GetHICON();
@@ -738,7 +738,7 @@ void wxFrame::MSWOnSize(int x, int y, WXUINT id)
}
}
bool wxFrame::MSWOnClose(void)
bool wxFrame::MSWOnClose()
{
return Close();
}
@@ -866,7 +866,7 @@ void wxFrame::OnCloseWindow(wxCloseEvent& event)
}
// Destroy the window (delayed, if a managed window)
bool wxFrame::Destroy(void)
bool wxFrame::Destroy()
{
if (!wxPendingDelete.Member(this))
wxPendingDelete.Append(this);
@@ -898,7 +898,7 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event)
}
}
wxMenuBar *wxFrame::GetMenuBar(void) const
wxMenuBar *wxFrame::GetMenuBar() const
{
return m_frameMenuBar;
}
@@ -1011,7 +1011,7 @@ wxToolBar* wxFrame::OnCreateToolBar(long style, wxWindowID id, const wxString& n
return new wxToolBar(this, id, wxDefaultPosition, wxDefaultSize, style, name);
}
void wxFrame::PositionToolBar(void)
void wxFrame::PositionToolBar()
{
RECT rect;
::GetClientRect((HWND) GetHWND(), &rect);

View File

@@ -94,7 +94,7 @@ bool wxGauge95::Create(wxWindow *parent, wxWindowID id,
return TRUE;
}
void wxGauge95::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxGauge95::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
GetPosition(&currentX, &currentY);

View File

@@ -142,7 +142,7 @@ bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id,
return TRUE;
}
void wxGaugeMSW::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxGaugeMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
GetPosition(&currentX, &currentY);

View File

@@ -140,7 +140,7 @@ bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
}
// Listbox item
wxListBox::wxListBox(void)
wxListBox::wxListBox()
{
m_noItems = 0;
m_selected = 0;
@@ -258,7 +258,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
return TRUE;
}
wxListBox::~wxListBox(void)
wxListBox::~wxListBox()
{
#if wxUSE_OWNER_DRAWN
size_t uiCount = m_aItems.Count();
@@ -268,7 +268,7 @@ wxListBox::~wxListBox(void)
#endif
}
void wxListBox::SetupColours(void)
void wxListBox::SetupColours()
{
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
SetForegroundColour(GetParent()->GetForegroundColour());
@@ -377,7 +377,7 @@ int wxListBox::FindString(const wxString& s) const
return pos;
}
void wxListBox::Clear(void)
void wxListBox::Clear()
{
ListBox_ResetContent(hwnd);
@@ -474,7 +474,7 @@ wxString wxListBox::GetString(int N) const
return wxString(wxBuffer);
}
void wxListBox::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxListBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
GetPosition(&currentX, &currentY);
@@ -640,13 +640,13 @@ void wxListBox::SetString(int N, const wxString& s)
#endif //USE_OWNER_DRAWN
}
int wxListBox::Number (void) const
int wxListBox::Number () const
{
return m_noItems;
}
// For single selection items only
wxString wxListBox::GetStringSelection (void) const
wxString wxListBox::GetStringSelection () const
{
int sel = GetSelection ();
if (sel > -1)

View File

@@ -569,7 +569,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
#endif
// Restored old code.
void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
GetPosition(&currentX, &currentY);

View File

@@ -40,7 +40,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSlider95, wxControl)
#endif
// Slider
wxSlider95::wxSlider95(void)
wxSlider95::wxSlider95()
{
m_staticValue = 0;
m_staticMin = 0;
@@ -264,7 +264,7 @@ void wxSlider95::MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control)
MSWOnVScroll(wParam, pos, control);
}
wxSlider95::~wxSlider95(void)
wxSlider95::~wxSlider95()
{
if (m_staticMin)
DestroyWindow((HWND) m_staticMin);
@@ -274,7 +274,7 @@ wxSlider95::~wxSlider95(void)
DestroyWindow((HWND) m_staticValue);
}
int wxSlider95::GetValue(void) const
int wxSlider95::GetValue() const
{
return ::SendMessage((HWND) GetHWND(), TBM_GETPOS, 0, 0);
}
@@ -343,7 +343,7 @@ void wxSlider95::GetPosition(int *x, int *y) const
*y = point.y;
}
void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxSlider95::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int x1 = x;
int y1 = y;
@@ -553,17 +553,17 @@ void wxSlider95::SetPageSize(int pageSize)
m_pageSize = pageSize;
}
int wxSlider95::GetPageSize(void) const
int wxSlider95::GetPageSize() const
{
return m_pageSize;
}
void wxSlider95::ClearSel(void)
void wxSlider95::ClearSel()
{
::SendMessage( (HWND) GetHWND(), TBM_CLEARSEL, (WPARAM) TRUE, (LPARAM) 0 );
}
void wxSlider95::ClearTicks(void)
void wxSlider95::ClearTicks()
{
::SendMessage( (HWND) GetHWND(), TBM_CLEARTICS, (WPARAM) TRUE, (LPARAM) 0 );
}
@@ -574,17 +574,17 @@ void wxSlider95::SetLineSize(int lineSize)
::SendMessage( (HWND) GetHWND(), TBM_SETLINESIZE, (WPARAM) 0, (LPARAM) lineSize );
}
int wxSlider95::GetLineSize(void) const
int wxSlider95::GetLineSize() const
{
return (int) ::SendMessage( (HWND) GetHWND(), TBM_GETLINESIZE, (WPARAM) 0, (LPARAM) 0 );
}
int wxSlider95::GetSelEnd(void) const
int wxSlider95::GetSelEnd() const
{
return (int) ::SendMessage( (HWND) GetHWND(), TBM_SETSELEND, (WPARAM) 0, (LPARAM) 0 );
}
int wxSlider95::GetSelStart(void) const
int wxSlider95::GetSelStart() const
{
return (int) ::SendMessage( (HWND) GetHWND(), TBM_GETSELSTART, (WPARAM) 0, (LPARAM) 0 );
}
@@ -599,7 +599,7 @@ void wxSlider95::SetThumbLength(int len)
::SendMessage( (HWND) GetHWND(), TBM_SETTHUMBLENGTH, (WPARAM) len, (LPARAM) 0 );
}
int wxSlider95::GetThumbLength(void) const
int wxSlider95::GetThumbLength() const
{
return (int) ::SendMessage( (HWND) GetHWND(), TBM_GETTHUMBLENGTH, (WPARAM) 0, (LPARAM) 0 );
}

View File

@@ -34,7 +34,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSliderMSW, wxControl)
#endif
// Slider
wxSliderMSW::wxSliderMSW(void)
wxSliderMSW::wxSliderMSW()
{
m_staticValue = 0;
m_staticMin = 0;
@@ -235,7 +235,7 @@ void wxSliderMSW::MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control)
MSWOnVScroll(wParam, pos, control);
}
wxSliderMSW::~wxSliderMSW(void)
wxSliderMSW::~wxSliderMSW()
{
if (m_staticMin)
DestroyWindow((HWND) m_staticMin);
@@ -245,7 +245,7 @@ wxSliderMSW::~wxSliderMSW(void)
DestroyWindow((HWND) m_staticValue);
}
int wxSliderMSW::GetValue(void) const
int wxSliderMSW::GetValue() const
{
return ::GetScrollPos((HWND) GetHWND(), SB_CTL);
}
@@ -314,7 +314,7 @@ void wxSliderMSW::GetPosition(int *x, int *y) const
*y = point.y;
}
void wxSliderMSW::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxSliderMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int x1 = x;
int y1 = y;
@@ -501,16 +501,16 @@ void wxSliderMSW::SetPageSize(int pageSize)
m_pageSize = pageSize;
}
int wxSliderMSW::GetPageSize(void) const
int wxSliderMSW::GetPageSize() const
{
return m_pageSize;
}
void wxSliderMSW::ClearSel(void)
void wxSliderMSW::ClearSel()
{
}
void wxSliderMSW::ClearTicks(void)
void wxSliderMSW::ClearTicks()
{
}
@@ -519,17 +519,17 @@ void wxSliderMSW::SetLineSize(int lineSize)
m_lineSize = lineSize;
}
int wxSliderMSW::GetLineSize(void) const
int wxSliderMSW::GetLineSize() const
{
return m_lineSize;
}
int wxSliderMSW::GetSelEnd(void) const
int wxSliderMSW::GetSelEnd() const
{
return 0;
}
int wxSliderMSW::GetSelStart(void) const
int wxSliderMSW::GetSelStart() const
{
return 0;
}
@@ -542,7 +542,7 @@ void wxSliderMSW::SetThumbLength(int len)
{
}
int wxSliderMSW::GetThumbLength(void) const
int wxSliderMSW::GetThumbLength() const
{
return 0;
}

View File

@@ -90,7 +90,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
return TRUE;
}
void wxStaticBitmap::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxStaticBitmap::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
GetPosition(&currentX, &currentY);

View File

@@ -102,7 +102,7 @@ void wxStaticBox::SetLabel(const wxString& label)
SetWindowText((HWND)m_hWnd, (const char *)label);
}
void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxStaticBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
GetPosition(&currentX, &currentY);

View File

@@ -94,7 +94,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
return TRUE;
}
void wxStaticText::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxStaticText::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
GetPosition(&currentX, &currentY);

View File

@@ -311,7 +311,7 @@ void wxTextCtrl::SetValue(const wxString& value)
SetWindowText((HWND) GetHWND(), (const char *)value);
}
void wxTextCtrl::SetSize(int x, int y, int width, int height, int sizeFlags)
void wxTextCtrl::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
GetPosition(&currentX, &currentY);