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:
@@ -67,22 +67,24 @@ public:
|
|||||||
m_alignment = wxLAYOUT_TOP;
|
m_alignment = wxLAYOUT_TOP;
|
||||||
m_orientation = wxLAYOUT_HORIZONTAL;
|
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; }
|
// Read by the app
|
||||||
inline int GetFlags() const { return m_flags; }
|
void SetRequestedLength(int length) { m_requestedLength = length; }
|
||||||
|
int GetRequestedLength() const { return m_requestedLength; }
|
||||||
|
|
||||||
// Set by the app
|
void SetFlags(int flags) { m_flags = flags; }
|
||||||
inline void SetSize(const wxSize& size) { m_size = size; }
|
int GetFlags() const { return m_flags; }
|
||||||
inline wxSize GetSize() const { return m_size; }
|
|
||||||
|
|
||||||
inline void SetOrientation(wxLayoutOrientation orient) { m_orientation = orient; }
|
// Set by the app
|
||||||
inline wxLayoutOrientation GetOrientation() const { return m_orientation; }
|
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:
|
protected:
|
||||||
int m_flags;
|
int m_flags;
|
||||||
int m_requestedLength;
|
int m_requestedLength;
|
||||||
|
@@ -37,30 +37,30 @@ public:
|
|||||||
~wxTabControl(void);
|
~wxTabControl(void);
|
||||||
|
|
||||||
virtual void OnDraw(wxDC& dc, bool lastInRow);
|
virtual void OnDraw(wxDC& dc, bool lastInRow);
|
||||||
inline void SetLabel(const wxString& str) { m_controlLabel = str; }
|
void SetLabel(const wxString& str) { m_controlLabel = str; }
|
||||||
inline wxString GetLabel(void) const { return m_controlLabel; }
|
wxString GetLabel(void) const { return m_controlLabel; }
|
||||||
|
|
||||||
inline void SetFont(const wxFont& f) { m_labelFont = f; }
|
void SetFont(const wxFont& f) { m_labelFont = f; }
|
||||||
inline wxFont *GetFont(void) const { return (wxFont*) & m_labelFont; }
|
wxFont *GetFont(void) const { return (wxFont*) & m_labelFont; }
|
||||||
|
|
||||||
inline void SetSelected(bool sel) { m_isSelected = sel; }
|
void SetSelected(bool sel) { m_isSelected = sel; }
|
||||||
inline bool IsSelected(void) const { return m_isSelected; }
|
bool IsSelected(void) const { return m_isSelected; }
|
||||||
|
|
||||||
inline void SetPosition(int x, int y) { m_offsetX = x; m_offsetY = y; }
|
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 SetSize(int x, int y) { m_width = x; m_height = y; }
|
||||||
|
|
||||||
inline void SetRowPosition(int r) { m_rowPosition = r; }
|
void SetRowPosition(int r) { m_rowPosition = r; }
|
||||||
inline int GetRowPosition() const { return m_rowPosition; }
|
int GetRowPosition() const { return m_rowPosition; }
|
||||||
inline void SetColPosition(int c) { m_colPosition = c; }
|
void SetColPosition(int c) { m_colPosition = c; }
|
||||||
inline int GetColPosition() const { return m_colPosition; }
|
int GetColPosition() const { return m_colPosition; }
|
||||||
|
|
||||||
inline int GetX(void) const { return m_offsetX; }
|
int GetX(void) const { return m_offsetX; }
|
||||||
inline int GetY(void) const { return m_offsetY; }
|
int GetY(void) const { return m_offsetY; }
|
||||||
inline int GetWidth(void) const { return m_width; }
|
int GetWidth(void) const { return m_width; }
|
||||||
inline int GetHeight(void) const { return m_height; }
|
int GetHeight(void) const { return m_height; }
|
||||||
|
|
||||||
inline int GetId(void) const { return m_id; }
|
int GetId(void) const { return m_id; }
|
||||||
inline void SetId(int i) { m_id = i; }
|
void SetId(int i) { m_id = i; }
|
||||||
|
|
||||||
virtual bool HitTest(int x, int y) const ;
|
virtual bool HitTest(int x, int y) const ;
|
||||||
|
|
||||||
|
@@ -207,7 +207,7 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
|
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
|
||||||
const wxValidator &validator = wxDefaultValidator,
|
const wxValidator &validator = wxDefaultValidator,
|
||||||
const wxString& name = wxTreeCtrlNameStr)
|
const wxString& name = wxTreeCtrlNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, pos, size, style, validator, name);
|
Create(parent, id, pos, size, style, validator, name);
|
||||||
@@ -219,7 +219,7 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
|
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
|
||||||
const wxValidator &validator = wxDefaultValidator,
|
const wxValidator &validator = wxDefaultValidator,
|
||||||
const wxString& name = wxTreeCtrlNameStr);
|
const wxString& name = wxTreeCtrlNameStr);
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
@@ -409,7 +409,7 @@ public:
|
|||||||
wxTreeItemId HitTest(const wxPoint& point)
|
wxTreeItemId HitTest(const wxPoint& point)
|
||||||
{ int dummy; return HitTest(point, dummy); }
|
{ int dummy; return HitTest(point, dummy); }
|
||||||
wxTreeItemId HitTest(const wxPoint& point, int& flags);
|
wxTreeItemId HitTest(const wxPoint& point, int& flags);
|
||||||
|
|
||||||
// start editing the item label: this (temporarily) replaces the item
|
// 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
|
// 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
|
// been before. textCtrlClass parameter allows you to create an edit
|
||||||
|
@@ -37,70 +37,72 @@ extern const char *wxDialogNameStr;
|
|||||||
|
|
||||||
class wxDialog: public wxPanel
|
class wxDialog: public wxPanel
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxDialog();
|
wxDialog();
|
||||||
wxDialog( wxWindow *parent, wxWindowID id,
|
wxDialog( wxWindow *parent, wxWindowID id,
|
||||||
const wxString &title,
|
const wxString &title,
|
||||||
const wxPoint &pos = wxDefaultPosition,
|
const wxPoint &pos = wxDefaultPosition,
|
||||||
const wxSize &size = wxDefaultSize,
|
const wxSize &size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_DIALOG_STYLE,
|
long style = wxDEFAULT_DIALOG_STYLE,
|
||||||
const wxString &name = wxDialogNameStr );
|
const wxString &name = wxDialogNameStr );
|
||||||
bool Create( wxWindow *parent, wxWindowID id,
|
bool Create( wxWindow *parent, wxWindowID id,
|
||||||
const wxString &title,
|
const wxString &title,
|
||||||
const wxPoint &pos = wxDefaultPosition,
|
const wxPoint &pos = wxDefaultPosition,
|
||||||
const wxSize &size = wxDefaultSize,
|
const wxSize &size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_DIALOG_STYLE,
|
long style = wxDEFAULT_DIALOG_STYLE,
|
||||||
const wxString &name = wxDialogNameStr );
|
const wxString &name = wxDialogNameStr );
|
||||||
~wxDialog();
|
~wxDialog();
|
||||||
|
|
||||||
void SetTitle(const wxString& title);
|
void SetTitle(const wxString& title);
|
||||||
wxString GetTitle() const;
|
wxString GetTitle() const;
|
||||||
|
|
||||||
void OnApply( wxCommandEvent &event );
|
void OnApply( wxCommandEvent &event );
|
||||||
void OnCancel( wxCommandEvent &event );
|
void OnCancel( wxCommandEvent &event );
|
||||||
void OnOK( wxCommandEvent &event );
|
void OnOK( wxCommandEvent &event );
|
||||||
void OnPaint( wxPaintEvent& event );
|
void OnPaint( wxPaintEvent& event );
|
||||||
void OnSize( wxSizeEvent &event );
|
void OnSize( wxSizeEvent &event );
|
||||||
void OnCloseWindow( wxCloseEvent& event );
|
void OnCloseWindow( wxCloseEvent& event );
|
||||||
/*
|
/*
|
||||||
void OnCharHook( wxKeyEvent& event );
|
void OnCharHook( wxKeyEvent& event );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool Destroy();
|
bool Destroy();
|
||||||
|
|
||||||
virtual void SetSize( int x, int y, int width, int height,
|
virtual bool Show( bool show );
|
||||||
int sizeFlags = wxSIZE_AUTO );
|
virtual int ShowModal();
|
||||||
virtual void SetSize( int width, int height );
|
virtual void EndModal( int retCode );
|
||||||
|
virtual bool IsModal() const;
|
||||||
|
void SetModal( bool modal );
|
||||||
|
|
||||||
virtual bool Show( bool show );
|
virtual void InitDialog(void);
|
||||||
virtual int ShowModal();
|
|
||||||
virtual void EndModal( int retCode );
|
|
||||||
virtual bool IsModal() const;
|
|
||||||
void SetModal( bool modal );
|
|
||||||
|
|
||||||
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 );
|
// implementation
|
||||||
virtual void Iconize( bool WXUNUSED(iconize)) { }
|
|
||||||
virtual bool IsIconized() const { return FALSE; }
|
|
||||||
bool Iconized() const { return IsIconized(); }
|
|
||||||
virtual void Maximize() { }
|
|
||||||
virtual void Restore() { }
|
|
||||||
|
|
||||||
// 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 );
|
bool m_modalShowing;
|
||||||
virtual void OnInternalIdle();
|
wxString m_title;
|
||||||
|
wxIcon m_icon;
|
||||||
|
|
||||||
bool m_modalShowing;
|
protected:
|
||||||
wxString m_title;
|
virtual void DoSetSize(int x, int y,
|
||||||
wxIcon m_icon;
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
private:
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKDIALOGH__
|
#endif // __GTKDIALOGH__
|
||||||
|
@@ -46,82 +46,83 @@ extern const char *wxToolBarNameStr;
|
|||||||
|
|
||||||
class wxFrame: public wxWindow
|
class wxFrame: public wxWindow
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||||
|
|
||||||
public:
|
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();
|
virtual bool Show( bool show );
|
||||||
wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
|
virtual void Centre( int direction = wxHORIZONTAL );
|
||||||
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 GetClientSize( int *width, int *height ) const;
|
||||||
virtual void Centre( int direction = wxHORIZONTAL );
|
|
||||||
|
|
||||||
virtual void GetClientSize( int *width, int *height ) const;
|
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
|
||||||
wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
|
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,
|
virtual void SetMenuBar( wxMenuBar *menuBar );
|
||||||
int sizeFlags = wxSIZE_AUTO );
|
virtual wxMenuBar *GetMenuBar() const;
|
||||||
virtual void SetSize( int width, int height );
|
|
||||||
|
|
||||||
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
|
virtual void SetTitle( const wxString &title );
|
||||||
const wxString& name = "statusBar");
|
virtual wxString GetTitle() const { return m_title; }
|
||||||
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 wxToolBar* CreateToolBar( long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1,
|
virtual void SetIcon( const wxIcon &icon );
|
||||||
const wxString& name = wxToolBarNameStr);
|
virtual void Iconize( bool WXUNUSED(iconize)) { }
|
||||||
virtual wxToolBar *OnCreateToolBar( long style, wxWindowID id, const wxString& name );
|
virtual bool IsIconized() const { return FALSE; }
|
||||||
virtual wxToolBar *GetToolBar() const;
|
bool Iconized() const { return IsIconized(); }
|
||||||
inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
|
virtual void Maximize(bool WXUNUSED(maximize)) {}
|
||||||
|
virtual void Restore() {}
|
||||||
|
|
||||||
virtual void SetMenuBar( wxMenuBar *menuBar );
|
void OnCloseWindow( wxCloseEvent& event );
|
||||||
virtual wxMenuBar *GetMenuBar() const;
|
void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp
|
||||||
|
void OnSize( wxSizeEvent &event );
|
||||||
|
|
||||||
virtual void SetTitle( const wxString &title );
|
void OnMenuHighlight( wxMenuEvent& event );
|
||||||
virtual wxString GetTitle() const { return m_title; }
|
|
||||||
|
|
||||||
virtual void SetIcon( const wxIcon &icon );
|
// implementation
|
||||||
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() {}
|
|
||||||
|
|
||||||
void OnCloseWindow( wxCloseEvent& event );
|
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||||
void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp
|
virtual wxPoint GetClientAreaOrigin() const;
|
||||||
void OnSize( wxSizeEvent &event );
|
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 void DoSetClientSize(int width, int height);
|
||||||
virtual wxPoint GetClientAreaOrigin() const;
|
|
||||||
void DoMenuUpdates();
|
|
||||||
void DoMenuUpdates(wxMenu* menu);
|
|
||||||
virtual void OnInternalIdle();
|
|
||||||
|
|
||||||
wxMenuBar *m_frameMenuBar;
|
private:
|
||||||
wxMenuBar *m_mdiMenuBar;
|
DECLARE_EVENT_TABLE()
|
||||||
wxStatusBar *m_frameStatusBar;
|
|
||||||
wxToolBar *m_frameToolBar;
|
|
||||||
wxString m_title;
|
|
||||||
wxIcon m_icon;
|
|
||||||
int m_miniEdge,m_miniTitle;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKFRAMEH__
|
#endif // __GTKFRAMEH__
|
||||||
|
@@ -131,8 +131,11 @@ class wxMDIChildFrame: public wxFrame
|
|||||||
virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {}
|
virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {}
|
||||||
|
|
||||||
// no size hints
|
// no size hints
|
||||||
virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH), int WXUNUSED(maxW),
|
virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH),
|
||||||
int WXUNUSED(maxH), int WXUNUSED(incW) ) {}
|
int WXUNUSED(maxW), int WXUNUSED(maxH),
|
||||||
|
int WXUNUSED(incW) )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
// no toolbar bars
|
// no toolbar bars
|
||||||
virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id),
|
virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id),
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
#define __GTKWINDOWH__
|
#define __GTKWINDOWH__
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
@@ -36,7 +36,7 @@ extern wxList wxTopLevelWindows;
|
|||||||
// global function
|
// global function
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxWindow* wxGetActiveWindow();
|
extern wxWindow* wxGetActiveWindow();
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// classes
|
// classes
|
||||||
@@ -49,11 +49,11 @@ class wxClientData;
|
|||||||
class wxVoidClientData;
|
class wxVoidClientData;
|
||||||
class wxWindow;
|
class wxWindow;
|
||||||
#if wxUSE_WX_RESOURCES
|
#if wxUSE_WX_RESOURCES
|
||||||
class wxResourceTable;
|
class wxResourceTable;
|
||||||
class wxItemResource;
|
class wxItemResource;
|
||||||
#endif
|
#endif
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
class wxDropTarget;
|
class wxDropTarget;
|
||||||
#endif
|
#endif
|
||||||
class wxToolTip;
|
class wxToolTip;
|
||||||
|
|
||||||
@@ -78,15 +78,15 @@ extern const wxPoint wxDefaultPosition;
|
|||||||
class wxClientData
|
class wxClientData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxClientData() { }
|
wxClientData() { }
|
||||||
virtual ~wxClientData() { }
|
virtual ~wxClientData() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxStringClientData
|
// wxStringClientData
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
class wxStringClientData: public wxClientData
|
class wxStringClientData : public wxClientData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxStringClientData() { }
|
wxStringClientData() { }
|
||||||
@@ -112,336 +112,438 @@ void debug_focus_in( GtkWidget* widget, const char* name, const char* window );
|
|||||||
// wxWindow
|
// wxWindow
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
class wxWindow: public wxEvtHandler
|
class wxWindow : public wxEvtHandler
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxWindow)
|
DECLARE_DYNAMIC_CLASS(wxWindow)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxWindow();
|
// creating the window
|
||||||
wxWindow(wxWindow *parent, wxWindowID id,
|
// -------------------
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
wxWindow();
|
||||||
const wxSize& size = wxDefaultSize,
|
wxWindow(wxWindow *parent, wxWindowID id,
|
||||||
long style = 0,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxString& name = wxPanelNameStr);
|
const wxSize& size = wxDefaultSize,
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
long style = 0,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxString& name = wxPanelNameStr);
|
||||||
const wxSize& size = wxDefaultSize,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
long style = 0,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxString& name = wxPanelNameStr);
|
const wxSize& size = wxDefaultSize,
|
||||||
virtual ~wxWindow();
|
long style = 0,
|
||||||
|
const wxString& name = wxPanelNameStr);
|
||||||
|
virtual ~wxWindow();
|
||||||
|
|
||||||
#if wxUSE_WX_RESOURCES
|
#if wxUSE_WX_RESOURCES
|
||||||
virtual bool LoadFromResource( wxWindow *parent, const wxString& resourceName,
|
virtual bool LoadFromResource(wxWindow *parent,
|
||||||
const wxResourceTable *table = (const wxResourceTable *) NULL);
|
const wxString& resourceName,
|
||||||
virtual wxControl *CreateItem(const wxItemResource* childResource, const wxItemResource* parentResource,
|
const wxResourceTable *table = (const wxResourceTable *) NULL);
|
||||||
const wxResourceTable *table = (const wxResourceTable *) NULL);
|
virtual wxControl *CreateItem(const wxItemResource* childResource,
|
||||||
#endif
|
const wxItemResource* parentResource,
|
||||||
|
const wxResourceTable *table = (const wxResourceTable *) NULL);
|
||||||
|
#endif // wxUSE_WX_RESOURCES
|
||||||
|
|
||||||
bool Close( bool force = FALSE );
|
// closing the window
|
||||||
virtual bool Destroy();
|
// ------------------
|
||||||
virtual bool DestroyChildren();
|
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,
|
// moving/resizing
|
||||||
int sizeFlags = wxSIZE_AUTO );
|
// ---------------
|
||||||
virtual void SetSize( int width, int height );
|
|
||||||
|
|
||||||
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;
|
void SetSize( int width, int height )
|
||||||
wxSize GetSize() const { int w, h; GetSize(& w, & h); return wxSize(w, h); }
|
{ 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;
|
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
|
{ DoSetSize(rect.x, rect.y, rect.width, rect.height, sizeFlags); }
|
||||||
|
|
||||||
virtual void GetPosition( int *x, int *y ) const;
|
void Move( int x, int y )
|
||||||
wxPoint GetPosition() const { int w, h; GetPosition(& w, & h); return wxPoint(w, h); }
|
{ DoSetSize( x, y, -1, -1, wxSIZE_USE_EXISTING ); }
|
||||||
|
|
||||||
wxRect GetRect() const
|
void Move(const wxPoint& pt)
|
||||||
{ int x, y, w, h; GetPosition(& x, & y); GetSize(& w, & h); return wxRect(x, y, w, h); }
|
{ Move(pt.x, pt.y); }
|
||||||
|
|
||||||
virtual void Centre( int direction = wxHORIZONTAL );
|
// client size is the size of area available for subwindows
|
||||||
inline void Center(int direction = wxHORIZONTAL) { Centre(direction); }
|
void SetClientSize( int width, int height )
|
||||||
virtual void Fit();
|
{ 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. */
|
void SetClientSize(const wxRect& rect)
|
||||||
wxPoint ConvertPixelsToDialog( const wxPoint& pt );
|
{ SetClientSize( rect.width, rect.height ); }
|
||||||
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 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 );
|
return wxPoint(w, h);
|
||||||
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();
|
virtual void GetSize( int *width, int *height ) const;
|
||||||
static wxWindow *FindFocus();
|
|
||||||
|
|
||||||
virtual void AddChild( wxWindow *child );
|
wxSize GetSize() const
|
||||||
wxList& GetChildren() { return m_children; }
|
{
|
||||||
|
int w, h;
|
||||||
|
GetSize(& w, & h);
|
||||||
|
return wxSize(w, h);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void RemoveChild( wxWindow *child );
|
wxRect GetRect() const
|
||||||
void SetReturnCode( int retCode );
|
{
|
||||||
int GetReturnCode();
|
int x, y, w, h;
|
||||||
|
GetPosition(& x, & y);
|
||||||
|
GetSize(& w, & h);
|
||||||
|
|
||||||
wxWindow *GetParent() const
|
return wxRect(x, y, w, h);
|
||||||
{ 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 );
|
|
||||||
|
|
||||||
wxEvtHandler *GetEventHandler() const;
|
virtual void GetClientSize( int *width, int *height ) const;
|
||||||
void SetEventHandler( wxEvtHandler *handler );
|
wxSize GetClientSize() const
|
||||||
void PushEventHandler( wxEvtHandler *handler );
|
{
|
||||||
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
int w, h;
|
||||||
|
GetClientSize(& w, & h);
|
||||||
|
return wxSize(w, h);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void SetValidator( const wxValidator &validator );
|
// position with respect to the the parent window
|
||||||
virtual wxValidator *GetValidator();
|
virtual void Centre( int direction = wxHORIZONTAL );
|
||||||
|
void Center(int direction = wxHORIZONTAL) { Centre(direction); }
|
||||||
|
virtual void Fit();
|
||||||
|
|
||||||
virtual void SetClientObject( wxClientData *data );
|
// set min/max size of the window
|
||||||
virtual wxClientData *GetClientObject();
|
virtual void SetSizeHints( int minW, int minH,
|
||||||
|
int maxW = -1, int maxH = -1,
|
||||||
|
int incW = -1, int incH = -1 );
|
||||||
|
|
||||||
virtual void SetClientData( void *data );
|
// Dialog units translations. Implemented in wincmn.cpp.
|
||||||
virtual void *GetClientData();
|
// -----------------------------------------------------
|
||||||
|
|
||||||
virtual void SetAcceleratorTable( const wxAcceleratorTable& accel );
|
wxPoint ConvertPixelsToDialog( const wxPoint& pt );
|
||||||
virtual wxAcceleratorTable *GetAcceleratorTable() { return &m_acceleratorTable; }
|
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 );
|
return wxSize(pt.x, pt.y);
|
||||||
wxWindowID GetId() const;
|
}
|
||||||
|
|
||||||
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
|
#if wxUSE_TOOLTIPS
|
||||||
void SetToolTip( const wxString &tip );
|
void SetToolTip( const wxString &tip );
|
||||||
virtual void SetToolTip( wxToolTip *tip );
|
virtual void SetToolTip( wxToolTip *tip );
|
||||||
wxToolTip* GetToolTip() const { return m_toolTip; }
|
wxToolTip* GetToolTip() const { return m_toolTip; }
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
|
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
|
|
||||||
virtual wxRegion GetUpdateRegion() const;
|
virtual wxRegion GetUpdateRegion() const;
|
||||||
virtual bool IsExposed( int x, int y ) const;
|
virtual bool IsExposed( int x, int y ) const;
|
||||||
virtual bool IsExposed( int x, int y, int w, int h ) const;
|
virtual bool IsExposed( int x, int y, int w, int h ) const;
|
||||||
virtual bool IsExposed( const wxPoint& pt ) const;
|
virtual bool IsExposed( const wxPoint& pt ) const;
|
||||||
virtual bool IsExposed( const wxRect& rect ) const;
|
virtual bool IsExposed( const wxRect& rect ) const;
|
||||||
|
|
||||||
virtual wxColour GetBackgroundColour() const;
|
// colours
|
||||||
virtual void SetBackgroundColour( const wxColour &colour );
|
// -------
|
||||||
virtual wxColour GetForegroundColour() const;
|
|
||||||
virtual void SetForegroundColour( const wxColour &colour );
|
|
||||||
|
|
||||||
virtual int GetCharHeight() const;
|
virtual wxColour GetBackgroundColour() const;
|
||||||
virtual int GetCharWidth() const;
|
virtual void SetBackgroundColour( const wxColour &colour );
|
||||||
virtual void GetTextExtent( const wxString& string, int *x, int *y,
|
virtual wxColour GetForegroundColour() const;
|
||||||
int *descent = (int *) NULL,
|
virtual void SetForegroundColour( const wxColour &colour );
|
||||||
int *externalLeading = (int *) NULL,
|
|
||||||
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
|
|
||||||
|
|
||||||
virtual void SetFont( const wxFont &font );
|
// fonts
|
||||||
virtual wxFont& GetFont() { return m_font; }
|
// -----
|
||||||
|
|
||||||
|
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
|
// For backward compatibility
|
||||||
virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
|
virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
|
||||||
virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
|
virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
|
||||||
virtual wxFont& GetLabelFont() { return GetFont(); };
|
virtual wxFont& GetLabelFont() { return GetFont(); };
|
||||||
virtual wxFont& GetButtonFont() { return GetFont(); };
|
virtual wxFont& GetButtonFont() { return GetFont(); };
|
||||||
|
|
||||||
virtual void SetWindowStyleFlag( long flag );
|
virtual void SetWindowStyleFlag( long flag );
|
||||||
virtual long GetWindowStyleFlag() const;
|
virtual long GetWindowStyleFlag() const;
|
||||||
|
|
||||||
virtual void CaptureMouse();
|
virtual void CaptureMouse();
|
||||||
virtual void ReleaseMouse();
|
virtual void ReleaseMouse();
|
||||||
|
|
||||||
virtual void SetTitle( const wxString &title );
|
virtual void SetTitle( const wxString &title );
|
||||||
virtual wxString GetTitle() const;
|
virtual wxString GetTitle() const;
|
||||||
virtual void SetName( const wxString &name );
|
virtual void SetName( const wxString &name );
|
||||||
virtual wxString GetName() const;
|
virtual wxString GetName() const;
|
||||||
virtual wxString GetLabel() const;
|
virtual wxString GetLabel() const;
|
||||||
|
|
||||||
void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) { }
|
void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) { }
|
||||||
void OnKeyDown( wxKeyEvent &event );
|
void OnKeyDown( wxKeyEvent &event );
|
||||||
|
|
||||||
virtual bool IsShown() const;
|
virtual bool IsShown() const;
|
||||||
|
|
||||||
virtual void Raise();
|
virtual void Raise();
|
||||||
virtual void Lower();
|
virtual void Lower();
|
||||||
|
|
||||||
virtual bool IsRetained();
|
virtual bool IsRetained();
|
||||||
virtual wxWindow *FindWindow( long id );
|
virtual wxWindow *FindWindow( long id );
|
||||||
virtual wxWindow *FindWindow( const wxString& name );
|
virtual wxWindow *FindWindow( const wxString& name );
|
||||||
|
|
||||||
void AllowDoubleClick( bool WXUNUSED(allow) ) { }
|
void AllowDoubleClick( bool WXUNUSED(allow) ) { }
|
||||||
void SetDoubleClick( bool WXUNUSED(allow) ) { }
|
void SetDoubleClick( bool WXUNUSED(allow) ) { }
|
||||||
|
|
||||||
virtual void ClientToScreen( int *x, int *y );
|
virtual void ClientToScreen( int *x, int *y );
|
||||||
virtual void ScreenToClient( int *x, int *y );
|
virtual void ScreenToClient( int *x, int *y );
|
||||||
|
|
||||||
virtual bool Validate();
|
virtual bool Validate();
|
||||||
virtual bool TransferDataToWindow();
|
virtual bool TransferDataToWindow();
|
||||||
virtual bool TransferDataFromWindow();
|
virtual bool TransferDataFromWindow();
|
||||||
void OnInitDialog( wxInitDialogEvent &event );
|
void OnInitDialog( wxInitDialogEvent &event );
|
||||||
virtual void InitDialog();
|
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
|
#if wxUSE_DRAG_AND_DROP
|
||||||
virtual void SetDropTarget( wxDropTarget *dropTarget );
|
virtual void SetDropTarget( wxDropTarget *dropTarget );
|
||||||
virtual wxDropTarget *GetDropTarget() const;
|
virtual wxDropTarget *GetDropTarget() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||||
int range, bool refresh = TRUE );
|
int range, bool refresh = TRUE );
|
||||||
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
|
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
|
||||||
virtual int GetScrollPos( int orient ) const;
|
virtual int GetScrollPos( int orient ) const;
|
||||||
virtual int GetScrollThumb( int orient ) const;
|
virtual int GetScrollThumb( int orient ) const;
|
||||||
virtual int GetScrollRange( int orient ) const;
|
virtual int GetScrollRange( int orient ) const;
|
||||||
virtual void ScrollWindow( int dx, int dy, const wxRect* rect = (wxRect *) NULL );
|
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 wxPoint GetClientAreaOrigin() const;
|
||||||
virtual void AdjustForParentClientOrigin( int& x, int& y, int sizeFlags );
|
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,
|
void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos,
|
||||||
const wxSize &size, long style, const wxString &name );
|
const wxSize &size, long style, const wxString &name );
|
||||||
void PostCreation();
|
void PostCreation();
|
||||||
|
|
||||||
/* the methods below are required because many native widgets
|
/* the methods below are required because many native widgets
|
||||||
are composed of several subwidgets and setting a style for
|
are composed of several subwidgets and setting a style for
|
||||||
the widget means setting it for all subwidgets as well.
|
the widget means setting it for all subwidgets as well.
|
||||||
also, it is nor clear, which native widget is the top
|
also, it is nor clear, which native widget is the top
|
||||||
widget where (most of) the input goes. even tooltips have
|
widget where (most of) the input goes. even tooltips have
|
||||||
to be applied to all subwidgets. */
|
to be applied to all subwidgets. */
|
||||||
|
|
||||||
virtual GtkWidget* GetConnectWidget();
|
virtual GtkWidget* GetConnectWidget();
|
||||||
virtual bool IsOwnGtkWindow( GdkWindow *window );
|
virtual bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
void ConnectWidget( GtkWidget *widget );
|
void ConnectWidget( GtkWidget *widget );
|
||||||
|
|
||||||
GtkStyle *GetWidgetStyle();
|
GtkStyle *GetWidgetStyle();
|
||||||
void SetWidgetStyle();
|
void SetWidgetStyle();
|
||||||
virtual void ApplyWidgetStyle();
|
virtual void ApplyWidgetStyle();
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
virtual void ApplyToolTip( GtkTooltips *tips, const char *tip );
|
virtual void ApplyToolTip( GtkTooltips *tips, const char *tip );
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
/* private member variables */
|
/* private member variables */
|
||||||
|
|
||||||
wxWindow *m_parent;
|
wxWindow *m_parent;
|
||||||
wxList m_children;
|
wxList m_children;
|
||||||
int m_x,m_y;
|
int m_x,m_y;
|
||||||
int m_width,m_height;
|
int m_width,m_height;
|
||||||
int m_minWidth,m_minHeight;
|
int m_minWidth,m_minHeight;
|
||||||
int m_maxWidth,m_maxHeight;
|
int m_maxWidth,m_maxHeight;
|
||||||
int m_retCode;
|
int m_retCode;
|
||||||
wxEvtHandler *m_eventHandler;
|
wxEvtHandler *m_eventHandler;
|
||||||
wxValidator *m_windowValidator;
|
wxValidator *m_windowValidator;
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
wxDropTarget *m_dropTarget;
|
wxDropTarget *m_dropTarget;
|
||||||
#endif
|
#endif
|
||||||
wxWindowID m_windowId;
|
wxWindowID m_windowId;
|
||||||
wxCursor *m_cursor;
|
wxCursor *m_cursor;
|
||||||
wxFont m_font;
|
wxFont m_font;
|
||||||
wxColour m_backgroundColour;
|
wxColour m_backgroundColour;
|
||||||
wxColour m_foregroundColour;
|
wxColour m_foregroundColour;
|
||||||
wxRegion m_updateRegion;
|
wxRegion m_updateRegion;
|
||||||
long m_windowStyle;
|
long m_windowStyle;
|
||||||
bool m_isShown;
|
bool m_isShown;
|
||||||
bool m_isEnabled;
|
bool m_isEnabled;
|
||||||
wxString m_windowName;
|
wxString m_windowName;
|
||||||
wxAcceleratorTable m_acceleratorTable;
|
wxAcceleratorTable m_acceleratorTable;
|
||||||
wxClientData *m_clientObject;
|
wxClientData *m_clientObject;
|
||||||
void *m_clientData;
|
void *m_clientData;
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
wxToolTip *m_toolTip;
|
wxToolTip *m_toolTip;
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
GtkWidget *m_widget;
|
GtkWidget *m_widget;
|
||||||
GtkWidget *m_wxwindow;
|
GtkWidget *m_wxwindow;
|
||||||
GtkAdjustment *m_hAdjust,*m_vAdjust;
|
GtkAdjustment *m_hAdjust,*m_vAdjust;
|
||||||
float m_oldHorizontalPos;
|
float m_oldHorizontalPos;
|
||||||
float m_oldVerticalPos;
|
float m_oldVerticalPos;
|
||||||
bool m_needParent;
|
bool m_needParent;
|
||||||
bool m_hasScrolling;
|
bool m_hasScrolling;
|
||||||
bool m_isScrolling;
|
bool m_isScrolling;
|
||||||
bool m_hasVMT;
|
bool m_hasVMT;
|
||||||
bool m_sizeSet;
|
bool m_sizeSet;
|
||||||
bool m_resizing;
|
bool m_resizing;
|
||||||
GdkGC *m_scrollGC;
|
GdkGC *m_scrollGC;
|
||||||
GtkStyle *m_widgetStyle;
|
GtkStyle *m_widgetStyle;
|
||||||
bool m_isStaticBox;
|
bool m_isStaticBox;
|
||||||
bool m_acceptsFocus;
|
bool m_acceptsFocus;
|
||||||
|
|
||||||
wxInsertChildFunction m_insertCallback;
|
wxInsertChildFunction m_insertCallback;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxLayoutConstraints *m_constraints;
|
wxLayoutConstraints *m_constraints;
|
||||||
wxList *m_constraintsInvolvedIn;
|
wxList *m_constraintsInvolvedIn;
|
||||||
wxSizer *m_windowSizer;
|
wxSizer *m_windowSizer;
|
||||||
wxWindow *m_sizerParent;
|
wxWindow *m_sizerParent;
|
||||||
bool m_autoLayout;
|
bool m_autoLayout;
|
||||||
|
|
||||||
wxLayoutConstraints *GetConstraints() const;
|
wxLayoutConstraints *GetConstraints() const;
|
||||||
void SetConstraints( wxLayoutConstraints *constraints );
|
void SetConstraints( wxLayoutConstraints *constraints );
|
||||||
void SetAutoLayout( bool autoLayout );
|
void SetAutoLayout( bool autoLayout );
|
||||||
bool GetAutoLayout() const;
|
bool GetAutoLayout() const;
|
||||||
bool Layout();
|
bool Layout();
|
||||||
void SetSizer( wxSizer *sizer );
|
void SetSizer( wxSizer *sizer );
|
||||||
wxSizer *GetSizer() const;
|
wxSizer *GetSizer() const;
|
||||||
void SetSizerParent( wxWindow *win );
|
void SetSizerParent( wxWindow *win );
|
||||||
wxWindow *GetSizerParent() const;
|
wxWindow *GetSizerParent() const;
|
||||||
void UnsetConstraints(wxLayoutConstraints *c);
|
void UnsetConstraints(wxLayoutConstraints *c);
|
||||||
inline wxList *GetConstraintsInvolvedIn() const ;
|
inline wxList *GetConstraintsInvolvedIn() const ;
|
||||||
void AddConstraintReference(wxWindow *otherWin);
|
void AddConstraintReference(wxWindow *otherWin);
|
||||||
void RemoveConstraintReference(wxWindow *otherWin);
|
void RemoveConstraintReference(wxWindow *otherWin);
|
||||||
void DeleteRelatedConstraints();
|
void DeleteRelatedConstraints();
|
||||||
virtual void ResetConstraints();
|
virtual void ResetConstraints();
|
||||||
virtual void SetConstraintSizes(bool recurse = TRUE);
|
virtual void SetConstraintSizes(bool recurse = TRUE);
|
||||||
virtual bool LayoutPhase1(int *noChanges);
|
virtual bool LayoutPhase1(int *noChanges);
|
||||||
virtual bool LayoutPhase2(int *noChanges);
|
virtual bool LayoutPhase2(int *noChanges);
|
||||||
virtual bool DoPhase(int);
|
virtual bool DoPhase(int);
|
||||||
virtual void TransformSizerToActual(int *x, int *y) const ;
|
virtual void TransformSizerToActual(int *x, int *y) const ;
|
||||||
virtual void SizerSetSize(int x, int y, int w, int h);
|
virtual void SizerSetSize(int x, int y, int w, int h);
|
||||||
virtual void SizerMove(int x, int y);
|
virtual void SizerMove(int x, int y);
|
||||||
virtual void SetSizeConstraint(int x, int y, int w, int h);
|
virtual void SetSizeConstraint(int x, int y, int w, int h);
|
||||||
virtual void MoveConstraint(int x, int y);
|
virtual void MoveConstraint(int x, int y);
|
||||||
virtual void GetSizeConstraint(int *w, int *h) const ;
|
virtual void GetSizeConstraint(int *w, int *h) const ;
|
||||||
virtual void GetClientSizeConstraint(int *w, int *h) const ;
|
virtual void GetClientSizeConstraint(int *w, int *h) const ;
|
||||||
virtual void GetPositionConstraint(int *x, int *y) 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:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKWINDOWH__
|
#endif // __GTKWINDOWH__
|
||||||
|
@@ -37,70 +37,72 @@ extern const char *wxDialogNameStr;
|
|||||||
|
|
||||||
class wxDialog: public wxPanel
|
class wxDialog: public wxPanel
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxDialog();
|
wxDialog();
|
||||||
wxDialog( wxWindow *parent, wxWindowID id,
|
wxDialog( wxWindow *parent, wxWindowID id,
|
||||||
const wxString &title,
|
const wxString &title,
|
||||||
const wxPoint &pos = wxDefaultPosition,
|
const wxPoint &pos = wxDefaultPosition,
|
||||||
const wxSize &size = wxDefaultSize,
|
const wxSize &size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_DIALOG_STYLE,
|
long style = wxDEFAULT_DIALOG_STYLE,
|
||||||
const wxString &name = wxDialogNameStr );
|
const wxString &name = wxDialogNameStr );
|
||||||
bool Create( wxWindow *parent, wxWindowID id,
|
bool Create( wxWindow *parent, wxWindowID id,
|
||||||
const wxString &title,
|
const wxString &title,
|
||||||
const wxPoint &pos = wxDefaultPosition,
|
const wxPoint &pos = wxDefaultPosition,
|
||||||
const wxSize &size = wxDefaultSize,
|
const wxSize &size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_DIALOG_STYLE,
|
long style = wxDEFAULT_DIALOG_STYLE,
|
||||||
const wxString &name = wxDialogNameStr );
|
const wxString &name = wxDialogNameStr );
|
||||||
~wxDialog();
|
~wxDialog();
|
||||||
|
|
||||||
void SetTitle(const wxString& title);
|
void SetTitle(const wxString& title);
|
||||||
wxString GetTitle() const;
|
wxString GetTitle() const;
|
||||||
|
|
||||||
void OnApply( wxCommandEvent &event );
|
void OnApply( wxCommandEvent &event );
|
||||||
void OnCancel( wxCommandEvent &event );
|
void OnCancel( wxCommandEvent &event );
|
||||||
void OnOK( wxCommandEvent &event );
|
void OnOK( wxCommandEvent &event );
|
||||||
void OnPaint( wxPaintEvent& event );
|
void OnPaint( wxPaintEvent& event );
|
||||||
void OnSize( wxSizeEvent &event );
|
void OnSize( wxSizeEvent &event );
|
||||||
void OnCloseWindow( wxCloseEvent& event );
|
void OnCloseWindow( wxCloseEvent& event );
|
||||||
/*
|
/*
|
||||||
void OnCharHook( wxKeyEvent& event );
|
void OnCharHook( wxKeyEvent& event );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool Destroy();
|
bool Destroy();
|
||||||
|
|
||||||
virtual void SetSize( int x, int y, int width, int height,
|
virtual bool Show( bool show );
|
||||||
int sizeFlags = wxSIZE_AUTO );
|
virtual int ShowModal();
|
||||||
virtual void SetSize( int width, int height );
|
virtual void EndModal( int retCode );
|
||||||
|
virtual bool IsModal() const;
|
||||||
|
void SetModal( bool modal );
|
||||||
|
|
||||||
virtual bool Show( bool show );
|
virtual void InitDialog(void);
|
||||||
virtual int ShowModal();
|
|
||||||
virtual void EndModal( int retCode );
|
|
||||||
virtual bool IsModal() const;
|
|
||||||
void SetModal( bool modal );
|
|
||||||
|
|
||||||
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 );
|
// implementation
|
||||||
virtual void Iconize( bool WXUNUSED(iconize)) { }
|
|
||||||
virtual bool IsIconized() const { return FALSE; }
|
|
||||||
bool Iconized() const { return IsIconized(); }
|
|
||||||
virtual void Maximize() { }
|
|
||||||
virtual void Restore() { }
|
|
||||||
|
|
||||||
// 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 );
|
bool m_modalShowing;
|
||||||
virtual void OnInternalIdle();
|
wxString m_title;
|
||||||
|
wxIcon m_icon;
|
||||||
|
|
||||||
bool m_modalShowing;
|
protected:
|
||||||
wxString m_title;
|
virtual void DoSetSize(int x, int y,
|
||||||
wxIcon m_icon;
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
private:
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKDIALOGH__
|
#endif // __GTKDIALOGH__
|
||||||
|
@@ -46,82 +46,83 @@ extern const char *wxToolBarNameStr;
|
|||||||
|
|
||||||
class wxFrame: public wxWindow
|
class wxFrame: public wxWindow
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||||
|
|
||||||
public:
|
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();
|
virtual bool Show( bool show );
|
||||||
wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
|
virtual void Centre( int direction = wxHORIZONTAL );
|
||||||
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 GetClientSize( int *width, int *height ) const;
|
||||||
virtual void Centre( int direction = wxHORIZONTAL );
|
|
||||||
|
|
||||||
virtual void GetClientSize( int *width, int *height ) const;
|
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
|
||||||
wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
|
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,
|
virtual void SetMenuBar( wxMenuBar *menuBar );
|
||||||
int sizeFlags = wxSIZE_AUTO );
|
virtual wxMenuBar *GetMenuBar() const;
|
||||||
virtual void SetSize( int width, int height );
|
|
||||||
|
|
||||||
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
|
virtual void SetTitle( const wxString &title );
|
||||||
const wxString& name = "statusBar");
|
virtual wxString GetTitle() const { return m_title; }
|
||||||
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 wxToolBar* CreateToolBar( long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1,
|
virtual void SetIcon( const wxIcon &icon );
|
||||||
const wxString& name = wxToolBarNameStr);
|
virtual void Iconize( bool WXUNUSED(iconize)) { }
|
||||||
virtual wxToolBar *OnCreateToolBar( long style, wxWindowID id, const wxString& name );
|
virtual bool IsIconized() const { return FALSE; }
|
||||||
virtual wxToolBar *GetToolBar() const;
|
bool Iconized() const { return IsIconized(); }
|
||||||
inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
|
virtual void Maximize(bool WXUNUSED(maximize)) {}
|
||||||
|
virtual void Restore() {}
|
||||||
|
|
||||||
virtual void SetMenuBar( wxMenuBar *menuBar );
|
void OnCloseWindow( wxCloseEvent& event );
|
||||||
virtual wxMenuBar *GetMenuBar() const;
|
void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp
|
||||||
|
void OnSize( wxSizeEvent &event );
|
||||||
|
|
||||||
virtual void SetTitle( const wxString &title );
|
void OnMenuHighlight( wxMenuEvent& event );
|
||||||
virtual wxString GetTitle() const { return m_title; }
|
|
||||||
|
|
||||||
virtual void SetIcon( const wxIcon &icon );
|
// implementation
|
||||||
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() {}
|
|
||||||
|
|
||||||
void OnCloseWindow( wxCloseEvent& event );
|
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||||
void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp
|
virtual wxPoint GetClientAreaOrigin() const;
|
||||||
void OnSize( wxSizeEvent &event );
|
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 void DoSetClientSize(int width, int height);
|
||||||
virtual wxPoint GetClientAreaOrigin() const;
|
|
||||||
void DoMenuUpdates();
|
|
||||||
void DoMenuUpdates(wxMenu* menu);
|
|
||||||
virtual void OnInternalIdle();
|
|
||||||
|
|
||||||
wxMenuBar *m_frameMenuBar;
|
private:
|
||||||
wxMenuBar *m_mdiMenuBar;
|
DECLARE_EVENT_TABLE()
|
||||||
wxStatusBar *m_frameStatusBar;
|
|
||||||
wxToolBar *m_frameToolBar;
|
|
||||||
wxString m_title;
|
|
||||||
wxIcon m_icon;
|
|
||||||
int m_miniEdge,m_miniTitle;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKFRAMEH__
|
#endif // __GTKFRAMEH__
|
||||||
|
@@ -131,8 +131,11 @@ class wxMDIChildFrame: public wxFrame
|
|||||||
virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {}
|
virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {}
|
||||||
|
|
||||||
// no size hints
|
// no size hints
|
||||||
virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH), int WXUNUSED(maxW),
|
virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH),
|
||||||
int WXUNUSED(maxH), int WXUNUSED(incW) ) {}
|
int WXUNUSED(maxW), int WXUNUSED(maxH),
|
||||||
|
int WXUNUSED(incW) )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
// no toolbar bars
|
// no toolbar bars
|
||||||
virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id),
|
virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id),
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
#define __GTKWINDOWH__
|
#define __GTKWINDOWH__
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
@@ -36,7 +36,7 @@ extern wxList wxTopLevelWindows;
|
|||||||
// global function
|
// global function
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxWindow* wxGetActiveWindow();
|
extern wxWindow* wxGetActiveWindow();
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// classes
|
// classes
|
||||||
@@ -49,11 +49,11 @@ class wxClientData;
|
|||||||
class wxVoidClientData;
|
class wxVoidClientData;
|
||||||
class wxWindow;
|
class wxWindow;
|
||||||
#if wxUSE_WX_RESOURCES
|
#if wxUSE_WX_RESOURCES
|
||||||
class wxResourceTable;
|
class wxResourceTable;
|
||||||
class wxItemResource;
|
class wxItemResource;
|
||||||
#endif
|
#endif
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
class wxDropTarget;
|
class wxDropTarget;
|
||||||
#endif
|
#endif
|
||||||
class wxToolTip;
|
class wxToolTip;
|
||||||
|
|
||||||
@@ -78,15 +78,15 @@ extern const wxPoint wxDefaultPosition;
|
|||||||
class wxClientData
|
class wxClientData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxClientData() { }
|
wxClientData() { }
|
||||||
virtual ~wxClientData() { }
|
virtual ~wxClientData() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxStringClientData
|
// wxStringClientData
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
class wxStringClientData: public wxClientData
|
class wxStringClientData : public wxClientData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxStringClientData() { }
|
wxStringClientData() { }
|
||||||
@@ -112,336 +112,438 @@ void debug_focus_in( GtkWidget* widget, const char* name, const char* window );
|
|||||||
// wxWindow
|
// wxWindow
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
class wxWindow: public wxEvtHandler
|
class wxWindow : public wxEvtHandler
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxWindow)
|
DECLARE_DYNAMIC_CLASS(wxWindow)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxWindow();
|
// creating the window
|
||||||
wxWindow(wxWindow *parent, wxWindowID id,
|
// -------------------
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
wxWindow();
|
||||||
const wxSize& size = wxDefaultSize,
|
wxWindow(wxWindow *parent, wxWindowID id,
|
||||||
long style = 0,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxString& name = wxPanelNameStr);
|
const wxSize& size = wxDefaultSize,
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
long style = 0,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxString& name = wxPanelNameStr);
|
||||||
const wxSize& size = wxDefaultSize,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
long style = 0,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxString& name = wxPanelNameStr);
|
const wxSize& size = wxDefaultSize,
|
||||||
virtual ~wxWindow();
|
long style = 0,
|
||||||
|
const wxString& name = wxPanelNameStr);
|
||||||
|
virtual ~wxWindow();
|
||||||
|
|
||||||
#if wxUSE_WX_RESOURCES
|
#if wxUSE_WX_RESOURCES
|
||||||
virtual bool LoadFromResource( wxWindow *parent, const wxString& resourceName,
|
virtual bool LoadFromResource(wxWindow *parent,
|
||||||
const wxResourceTable *table = (const wxResourceTable *) NULL);
|
const wxString& resourceName,
|
||||||
virtual wxControl *CreateItem(const wxItemResource* childResource, const wxItemResource* parentResource,
|
const wxResourceTable *table = (const wxResourceTable *) NULL);
|
||||||
const wxResourceTable *table = (const wxResourceTable *) NULL);
|
virtual wxControl *CreateItem(const wxItemResource* childResource,
|
||||||
#endif
|
const wxItemResource* parentResource,
|
||||||
|
const wxResourceTable *table = (const wxResourceTable *) NULL);
|
||||||
|
#endif // wxUSE_WX_RESOURCES
|
||||||
|
|
||||||
bool Close( bool force = FALSE );
|
// closing the window
|
||||||
virtual bool Destroy();
|
// ------------------
|
||||||
virtual bool DestroyChildren();
|
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,
|
// moving/resizing
|
||||||
int sizeFlags = wxSIZE_AUTO );
|
// ---------------
|
||||||
virtual void SetSize( int width, int height );
|
|
||||||
|
|
||||||
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;
|
void SetSize( int width, int height )
|
||||||
wxSize GetSize() const { int w, h; GetSize(& w, & h); return wxSize(w, h); }
|
{ 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;
|
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
|
{ DoSetSize(rect.x, rect.y, rect.width, rect.height, sizeFlags); }
|
||||||
|
|
||||||
virtual void GetPosition( int *x, int *y ) const;
|
void Move( int x, int y )
|
||||||
wxPoint GetPosition() const { int w, h; GetPosition(& w, & h); return wxPoint(w, h); }
|
{ DoSetSize( x, y, -1, -1, wxSIZE_USE_EXISTING ); }
|
||||||
|
|
||||||
wxRect GetRect() const
|
void Move(const wxPoint& pt)
|
||||||
{ int x, y, w, h; GetPosition(& x, & y); GetSize(& w, & h); return wxRect(x, y, w, h); }
|
{ Move(pt.x, pt.y); }
|
||||||
|
|
||||||
virtual void Centre( int direction = wxHORIZONTAL );
|
// client size is the size of area available for subwindows
|
||||||
inline void Center(int direction = wxHORIZONTAL) { Centre(direction); }
|
void SetClientSize( int width, int height )
|
||||||
virtual void Fit();
|
{ 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. */
|
void SetClientSize(const wxRect& rect)
|
||||||
wxPoint ConvertPixelsToDialog( const wxPoint& pt );
|
{ SetClientSize( rect.width, rect.height ); }
|
||||||
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 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 );
|
return wxPoint(w, h);
|
||||||
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();
|
virtual void GetSize( int *width, int *height ) const;
|
||||||
static wxWindow *FindFocus();
|
|
||||||
|
|
||||||
virtual void AddChild( wxWindow *child );
|
wxSize GetSize() const
|
||||||
wxList& GetChildren() { return m_children; }
|
{
|
||||||
|
int w, h;
|
||||||
|
GetSize(& w, & h);
|
||||||
|
return wxSize(w, h);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void RemoveChild( wxWindow *child );
|
wxRect GetRect() const
|
||||||
void SetReturnCode( int retCode );
|
{
|
||||||
int GetReturnCode();
|
int x, y, w, h;
|
||||||
|
GetPosition(& x, & y);
|
||||||
|
GetSize(& w, & h);
|
||||||
|
|
||||||
wxWindow *GetParent() const
|
return wxRect(x, y, w, h);
|
||||||
{ 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 );
|
|
||||||
|
|
||||||
wxEvtHandler *GetEventHandler() const;
|
virtual void GetClientSize( int *width, int *height ) const;
|
||||||
void SetEventHandler( wxEvtHandler *handler );
|
wxSize GetClientSize() const
|
||||||
void PushEventHandler( wxEvtHandler *handler );
|
{
|
||||||
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
int w, h;
|
||||||
|
GetClientSize(& w, & h);
|
||||||
|
return wxSize(w, h);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void SetValidator( const wxValidator &validator );
|
// position with respect to the the parent window
|
||||||
virtual wxValidator *GetValidator();
|
virtual void Centre( int direction = wxHORIZONTAL );
|
||||||
|
void Center(int direction = wxHORIZONTAL) { Centre(direction); }
|
||||||
|
virtual void Fit();
|
||||||
|
|
||||||
virtual void SetClientObject( wxClientData *data );
|
// set min/max size of the window
|
||||||
virtual wxClientData *GetClientObject();
|
virtual void SetSizeHints( int minW, int minH,
|
||||||
|
int maxW = -1, int maxH = -1,
|
||||||
|
int incW = -1, int incH = -1 );
|
||||||
|
|
||||||
virtual void SetClientData( void *data );
|
// Dialog units translations. Implemented in wincmn.cpp.
|
||||||
virtual void *GetClientData();
|
// -----------------------------------------------------
|
||||||
|
|
||||||
virtual void SetAcceleratorTable( const wxAcceleratorTable& accel );
|
wxPoint ConvertPixelsToDialog( const wxPoint& pt );
|
||||||
virtual wxAcceleratorTable *GetAcceleratorTable() { return &m_acceleratorTable; }
|
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 );
|
return wxSize(pt.x, pt.y);
|
||||||
wxWindowID GetId() const;
|
}
|
||||||
|
|
||||||
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
|
#if wxUSE_TOOLTIPS
|
||||||
void SetToolTip( const wxString &tip );
|
void SetToolTip( const wxString &tip );
|
||||||
virtual void SetToolTip( wxToolTip *tip );
|
virtual void SetToolTip( wxToolTip *tip );
|
||||||
wxToolTip* GetToolTip() const { return m_toolTip; }
|
wxToolTip* GetToolTip() const { return m_toolTip; }
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
|
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
|
|
||||||
virtual wxRegion GetUpdateRegion() const;
|
virtual wxRegion GetUpdateRegion() const;
|
||||||
virtual bool IsExposed( int x, int y ) const;
|
virtual bool IsExposed( int x, int y ) const;
|
||||||
virtual bool IsExposed( int x, int y, int w, int h ) const;
|
virtual bool IsExposed( int x, int y, int w, int h ) const;
|
||||||
virtual bool IsExposed( const wxPoint& pt ) const;
|
virtual bool IsExposed( const wxPoint& pt ) const;
|
||||||
virtual bool IsExposed( const wxRect& rect ) const;
|
virtual bool IsExposed( const wxRect& rect ) const;
|
||||||
|
|
||||||
virtual wxColour GetBackgroundColour() const;
|
// colours
|
||||||
virtual void SetBackgroundColour( const wxColour &colour );
|
// -------
|
||||||
virtual wxColour GetForegroundColour() const;
|
|
||||||
virtual void SetForegroundColour( const wxColour &colour );
|
|
||||||
|
|
||||||
virtual int GetCharHeight() const;
|
virtual wxColour GetBackgroundColour() const;
|
||||||
virtual int GetCharWidth() const;
|
virtual void SetBackgroundColour( const wxColour &colour );
|
||||||
virtual void GetTextExtent( const wxString& string, int *x, int *y,
|
virtual wxColour GetForegroundColour() const;
|
||||||
int *descent = (int *) NULL,
|
virtual void SetForegroundColour( const wxColour &colour );
|
||||||
int *externalLeading = (int *) NULL,
|
|
||||||
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
|
|
||||||
|
|
||||||
virtual void SetFont( const wxFont &font );
|
// fonts
|
||||||
virtual wxFont& GetFont() { return m_font; }
|
// -----
|
||||||
|
|
||||||
|
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
|
// For backward compatibility
|
||||||
virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
|
virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
|
||||||
virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
|
virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
|
||||||
virtual wxFont& GetLabelFont() { return GetFont(); };
|
virtual wxFont& GetLabelFont() { return GetFont(); };
|
||||||
virtual wxFont& GetButtonFont() { return GetFont(); };
|
virtual wxFont& GetButtonFont() { return GetFont(); };
|
||||||
|
|
||||||
virtual void SetWindowStyleFlag( long flag );
|
virtual void SetWindowStyleFlag( long flag );
|
||||||
virtual long GetWindowStyleFlag() const;
|
virtual long GetWindowStyleFlag() const;
|
||||||
|
|
||||||
virtual void CaptureMouse();
|
virtual void CaptureMouse();
|
||||||
virtual void ReleaseMouse();
|
virtual void ReleaseMouse();
|
||||||
|
|
||||||
virtual void SetTitle( const wxString &title );
|
virtual void SetTitle( const wxString &title );
|
||||||
virtual wxString GetTitle() const;
|
virtual wxString GetTitle() const;
|
||||||
virtual void SetName( const wxString &name );
|
virtual void SetName( const wxString &name );
|
||||||
virtual wxString GetName() const;
|
virtual wxString GetName() const;
|
||||||
virtual wxString GetLabel() const;
|
virtual wxString GetLabel() const;
|
||||||
|
|
||||||
void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) { }
|
void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) { }
|
||||||
void OnKeyDown( wxKeyEvent &event );
|
void OnKeyDown( wxKeyEvent &event );
|
||||||
|
|
||||||
virtual bool IsShown() const;
|
virtual bool IsShown() const;
|
||||||
|
|
||||||
virtual void Raise();
|
virtual void Raise();
|
||||||
virtual void Lower();
|
virtual void Lower();
|
||||||
|
|
||||||
virtual bool IsRetained();
|
virtual bool IsRetained();
|
||||||
virtual wxWindow *FindWindow( long id );
|
virtual wxWindow *FindWindow( long id );
|
||||||
virtual wxWindow *FindWindow( const wxString& name );
|
virtual wxWindow *FindWindow( const wxString& name );
|
||||||
|
|
||||||
void AllowDoubleClick( bool WXUNUSED(allow) ) { }
|
void AllowDoubleClick( bool WXUNUSED(allow) ) { }
|
||||||
void SetDoubleClick( bool WXUNUSED(allow) ) { }
|
void SetDoubleClick( bool WXUNUSED(allow) ) { }
|
||||||
|
|
||||||
virtual void ClientToScreen( int *x, int *y );
|
virtual void ClientToScreen( int *x, int *y );
|
||||||
virtual void ScreenToClient( int *x, int *y );
|
virtual void ScreenToClient( int *x, int *y );
|
||||||
|
|
||||||
virtual bool Validate();
|
virtual bool Validate();
|
||||||
virtual bool TransferDataToWindow();
|
virtual bool TransferDataToWindow();
|
||||||
virtual bool TransferDataFromWindow();
|
virtual bool TransferDataFromWindow();
|
||||||
void OnInitDialog( wxInitDialogEvent &event );
|
void OnInitDialog( wxInitDialogEvent &event );
|
||||||
virtual void InitDialog();
|
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
|
#if wxUSE_DRAG_AND_DROP
|
||||||
virtual void SetDropTarget( wxDropTarget *dropTarget );
|
virtual void SetDropTarget( wxDropTarget *dropTarget );
|
||||||
virtual wxDropTarget *GetDropTarget() const;
|
virtual wxDropTarget *GetDropTarget() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||||
int range, bool refresh = TRUE );
|
int range, bool refresh = TRUE );
|
||||||
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
|
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
|
||||||
virtual int GetScrollPos( int orient ) const;
|
virtual int GetScrollPos( int orient ) const;
|
||||||
virtual int GetScrollThumb( int orient ) const;
|
virtual int GetScrollThumb( int orient ) const;
|
||||||
virtual int GetScrollRange( int orient ) const;
|
virtual int GetScrollRange( int orient ) const;
|
||||||
virtual void ScrollWindow( int dx, int dy, const wxRect* rect = (wxRect *) NULL );
|
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 wxPoint GetClientAreaOrigin() const;
|
||||||
virtual void AdjustForParentClientOrigin( int& x, int& y, int sizeFlags );
|
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,
|
void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos,
|
||||||
const wxSize &size, long style, const wxString &name );
|
const wxSize &size, long style, const wxString &name );
|
||||||
void PostCreation();
|
void PostCreation();
|
||||||
|
|
||||||
/* the methods below are required because many native widgets
|
/* the methods below are required because many native widgets
|
||||||
are composed of several subwidgets and setting a style for
|
are composed of several subwidgets and setting a style for
|
||||||
the widget means setting it for all subwidgets as well.
|
the widget means setting it for all subwidgets as well.
|
||||||
also, it is nor clear, which native widget is the top
|
also, it is nor clear, which native widget is the top
|
||||||
widget where (most of) the input goes. even tooltips have
|
widget where (most of) the input goes. even tooltips have
|
||||||
to be applied to all subwidgets. */
|
to be applied to all subwidgets. */
|
||||||
|
|
||||||
virtual GtkWidget* GetConnectWidget();
|
virtual GtkWidget* GetConnectWidget();
|
||||||
virtual bool IsOwnGtkWindow( GdkWindow *window );
|
virtual bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
void ConnectWidget( GtkWidget *widget );
|
void ConnectWidget( GtkWidget *widget );
|
||||||
|
|
||||||
GtkStyle *GetWidgetStyle();
|
GtkStyle *GetWidgetStyle();
|
||||||
void SetWidgetStyle();
|
void SetWidgetStyle();
|
||||||
virtual void ApplyWidgetStyle();
|
virtual void ApplyWidgetStyle();
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
virtual void ApplyToolTip( GtkTooltips *tips, const char *tip );
|
virtual void ApplyToolTip( GtkTooltips *tips, const char *tip );
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
/* private member variables */
|
/* private member variables */
|
||||||
|
|
||||||
wxWindow *m_parent;
|
wxWindow *m_parent;
|
||||||
wxList m_children;
|
wxList m_children;
|
||||||
int m_x,m_y;
|
int m_x,m_y;
|
||||||
int m_width,m_height;
|
int m_width,m_height;
|
||||||
int m_minWidth,m_minHeight;
|
int m_minWidth,m_minHeight;
|
||||||
int m_maxWidth,m_maxHeight;
|
int m_maxWidth,m_maxHeight;
|
||||||
int m_retCode;
|
int m_retCode;
|
||||||
wxEvtHandler *m_eventHandler;
|
wxEvtHandler *m_eventHandler;
|
||||||
wxValidator *m_windowValidator;
|
wxValidator *m_windowValidator;
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
wxDropTarget *m_dropTarget;
|
wxDropTarget *m_dropTarget;
|
||||||
#endif
|
#endif
|
||||||
wxWindowID m_windowId;
|
wxWindowID m_windowId;
|
||||||
wxCursor *m_cursor;
|
wxCursor *m_cursor;
|
||||||
wxFont m_font;
|
wxFont m_font;
|
||||||
wxColour m_backgroundColour;
|
wxColour m_backgroundColour;
|
||||||
wxColour m_foregroundColour;
|
wxColour m_foregroundColour;
|
||||||
wxRegion m_updateRegion;
|
wxRegion m_updateRegion;
|
||||||
long m_windowStyle;
|
long m_windowStyle;
|
||||||
bool m_isShown;
|
bool m_isShown;
|
||||||
bool m_isEnabled;
|
bool m_isEnabled;
|
||||||
wxString m_windowName;
|
wxString m_windowName;
|
||||||
wxAcceleratorTable m_acceleratorTable;
|
wxAcceleratorTable m_acceleratorTable;
|
||||||
wxClientData *m_clientObject;
|
wxClientData *m_clientObject;
|
||||||
void *m_clientData;
|
void *m_clientData;
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
wxToolTip *m_toolTip;
|
wxToolTip *m_toolTip;
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
GtkWidget *m_widget;
|
GtkWidget *m_widget;
|
||||||
GtkWidget *m_wxwindow;
|
GtkWidget *m_wxwindow;
|
||||||
GtkAdjustment *m_hAdjust,*m_vAdjust;
|
GtkAdjustment *m_hAdjust,*m_vAdjust;
|
||||||
float m_oldHorizontalPos;
|
float m_oldHorizontalPos;
|
||||||
float m_oldVerticalPos;
|
float m_oldVerticalPos;
|
||||||
bool m_needParent;
|
bool m_needParent;
|
||||||
bool m_hasScrolling;
|
bool m_hasScrolling;
|
||||||
bool m_isScrolling;
|
bool m_isScrolling;
|
||||||
bool m_hasVMT;
|
bool m_hasVMT;
|
||||||
bool m_sizeSet;
|
bool m_sizeSet;
|
||||||
bool m_resizing;
|
bool m_resizing;
|
||||||
GdkGC *m_scrollGC;
|
GdkGC *m_scrollGC;
|
||||||
GtkStyle *m_widgetStyle;
|
GtkStyle *m_widgetStyle;
|
||||||
bool m_isStaticBox;
|
bool m_isStaticBox;
|
||||||
bool m_acceptsFocus;
|
bool m_acceptsFocus;
|
||||||
|
|
||||||
wxInsertChildFunction m_insertCallback;
|
wxInsertChildFunction m_insertCallback;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxLayoutConstraints *m_constraints;
|
wxLayoutConstraints *m_constraints;
|
||||||
wxList *m_constraintsInvolvedIn;
|
wxList *m_constraintsInvolvedIn;
|
||||||
wxSizer *m_windowSizer;
|
wxSizer *m_windowSizer;
|
||||||
wxWindow *m_sizerParent;
|
wxWindow *m_sizerParent;
|
||||||
bool m_autoLayout;
|
bool m_autoLayout;
|
||||||
|
|
||||||
wxLayoutConstraints *GetConstraints() const;
|
wxLayoutConstraints *GetConstraints() const;
|
||||||
void SetConstraints( wxLayoutConstraints *constraints );
|
void SetConstraints( wxLayoutConstraints *constraints );
|
||||||
void SetAutoLayout( bool autoLayout );
|
void SetAutoLayout( bool autoLayout );
|
||||||
bool GetAutoLayout() const;
|
bool GetAutoLayout() const;
|
||||||
bool Layout();
|
bool Layout();
|
||||||
void SetSizer( wxSizer *sizer );
|
void SetSizer( wxSizer *sizer );
|
||||||
wxSizer *GetSizer() const;
|
wxSizer *GetSizer() const;
|
||||||
void SetSizerParent( wxWindow *win );
|
void SetSizerParent( wxWindow *win );
|
||||||
wxWindow *GetSizerParent() const;
|
wxWindow *GetSizerParent() const;
|
||||||
void UnsetConstraints(wxLayoutConstraints *c);
|
void UnsetConstraints(wxLayoutConstraints *c);
|
||||||
inline wxList *GetConstraintsInvolvedIn() const ;
|
inline wxList *GetConstraintsInvolvedIn() const ;
|
||||||
void AddConstraintReference(wxWindow *otherWin);
|
void AddConstraintReference(wxWindow *otherWin);
|
||||||
void RemoveConstraintReference(wxWindow *otherWin);
|
void RemoveConstraintReference(wxWindow *otherWin);
|
||||||
void DeleteRelatedConstraints();
|
void DeleteRelatedConstraints();
|
||||||
virtual void ResetConstraints();
|
virtual void ResetConstraints();
|
||||||
virtual void SetConstraintSizes(bool recurse = TRUE);
|
virtual void SetConstraintSizes(bool recurse = TRUE);
|
||||||
virtual bool LayoutPhase1(int *noChanges);
|
virtual bool LayoutPhase1(int *noChanges);
|
||||||
virtual bool LayoutPhase2(int *noChanges);
|
virtual bool LayoutPhase2(int *noChanges);
|
||||||
virtual bool DoPhase(int);
|
virtual bool DoPhase(int);
|
||||||
virtual void TransformSizerToActual(int *x, int *y) const ;
|
virtual void TransformSizerToActual(int *x, int *y) const ;
|
||||||
virtual void SizerSetSize(int x, int y, int w, int h);
|
virtual void SizerSetSize(int x, int y, int w, int h);
|
||||||
virtual void SizerMove(int x, int y);
|
virtual void SizerMove(int x, int y);
|
||||||
virtual void SetSizeConstraint(int x, int y, int w, int h);
|
virtual void SetSizeConstraint(int x, int y, int w, int h);
|
||||||
virtual void MoveConstraint(int x, int y);
|
virtual void MoveConstraint(int x, int y);
|
||||||
virtual void GetSizeConstraint(int *w, int *h) const ;
|
virtual void GetSizeConstraint(int *w, int *h) const ;
|
||||||
virtual void GetClientSizeConstraint(int *w, int *h) const ;
|
virtual void GetClientSizeConstraint(int *w, int *h) const ;
|
||||||
virtual void GetPositionConstraint(int *x, int *y) 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:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKWINDOWH__
|
#endif // __GTKWINDOWH__
|
||||||
|
@@ -232,21 +232,11 @@ public:
|
|||||||
|
|
||||||
bool Create(wxWindow *parent, wxSizerBehaviour behav = wxSizerNone);
|
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;
|
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); }
|
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;
|
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 SizerSetSize(int x, int y, int w, int h) { SetSize(x, y, w, h); }
|
||||||
void SizerMove(int x, int y) { Move(x, y); }
|
void SizerMove(int x, int y) { Move(x, y); }
|
||||||
@@ -263,6 +253,11 @@ public:
|
|||||||
|
|
||||||
virtual bool LayoutPhase1(int *);
|
virtual bool LayoutPhase1(int *);
|
||||||
virtual bool LayoutPhase2(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
|
#define wxSIZER_ROWS TRUE
|
||||||
@@ -287,7 +282,6 @@ public:
|
|||||||
|
|
||||||
bool Create(wxWindow *parent, bool rowOrCol = wxSIZER_ROWS,
|
bool Create(wxWindow *parent, bool rowOrCol = wxSIZER_ROWS,
|
||||||
int rowsOrColSize = 20, wxSizerBehaviour = wxSizerShrink);
|
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 void SetRowOrCol(bool rc) { rowOrCol = rc; }
|
||||||
virtual bool GetRowOrCol() { return rowOrCol; }
|
virtual bool GetRowOrCol() { return rowOrCol; }
|
||||||
|
@@ -54,39 +54,38 @@ class WXDLLEXPORT wxCheckBox: public wxControl
|
|||||||
|
|
||||||
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
|
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int checkWidth ;
|
int checkWidth;
|
||||||
int checkHeight ;
|
int checkHeight;
|
||||||
|
|
||||||
inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
|
inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
|
||||||
inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = 0,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxCheckBoxNameStr)
|
const wxString& name = wxCheckBoxNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, label, pos, size, style, validator, name);
|
Create(parent, id, label, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
|
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = 0,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxCheckBoxNameStr);
|
const wxString& name = wxCheckBoxNameStr);
|
||||||
|
|
||||||
virtual void SetValue(bool);
|
virtual void SetValue(bool value);
|
||||||
virtual bool GetValue() const ;
|
virtual bool GetValue() const;
|
||||||
|
|
||||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
virtual void SetLabel(const wxBitmap& bitmap);
|
||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
|
||||||
{ 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);
|
protected:
|
||||||
virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
// _WX_CHECKBOX_H_
|
// _WX_CHECKBOX_H_
|
||||||
|
@@ -23,70 +23,68 @@ WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
|
|||||||
// Choice item
|
// Choice item
|
||||||
class WXDLLEXPORT wxChoice: public wxControl
|
class WXDLLEXPORT wxChoice: public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxChoice)
|
DECLARE_DYNAMIC_CLASS(wxChoice)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxChoice();
|
wxChoice();
|
||||||
~wxChoice();
|
~wxChoice();
|
||||||
|
|
||||||
inline wxChoice(wxWindow *parent, wxWindowID id,
|
wxChoice(wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxChoiceNameStr)
|
const wxString& name = wxChoiceNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxChoiceNameStr);
|
const wxString& name = wxChoiceNameStr);
|
||||||
|
|
||||||
virtual void Append(const wxString& item);
|
virtual void Append(const wxString& item);
|
||||||
virtual void Delete(int n);
|
virtual void Delete(int n);
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
virtual int GetSelection() const ;
|
virtual int GetSelection() const ;
|
||||||
virtual void SetSelection(int n);
|
virtual void SetSelection(int n);
|
||||||
virtual int FindString(const wxString& s) const;
|
virtual int FindString(const wxString& s) const;
|
||||||
virtual wxString GetString(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 wxString GetStringSelection() const ;
|
||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual bool SetStringSelection(const wxString& sel);
|
||||||
{ 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 int Number() const { return m_noStrings; }
|
||||||
virtual bool SetStringSelection(const wxString& sel);
|
virtual void Command(wxCommandEvent& event);
|
||||||
|
|
||||||
virtual inline int Number() const { return m_noStrings; }
|
virtual void SetColumns(int n = 1 );
|
||||||
virtual void Command(wxCommandEvent& event);
|
virtual int GetColumns() const ;
|
||||||
|
|
||||||
virtual void SetColumns(int n = 1 );
|
void SetFocus();
|
||||||
virtual int GetColumns() const ;
|
|
||||||
|
|
||||||
void SetFocus();
|
// Implementation
|
||||||
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||||
// Implementation
|
virtual void ChangeBackgroundColour();
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeForegroundColour();
|
||||||
virtual void ChangeBackgroundColour();
|
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||||
virtual void ChangeForegroundColour();
|
WXWidget GetMainWidget() const { return m_buttonWidget; }
|
||||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
|
||||||
WXWidget GetMainWidget() const { return m_buttonWidget; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_noStrings;
|
int m_noStrings;
|
||||||
WXWidget m_menuWidget;
|
WXWidget m_menuWidget;
|
||||||
WXWidget m_buttonWidget;
|
WXWidget m_buttonWidget;
|
||||||
WXWidget* m_widgetList ;
|
WXWidget* m_widgetList ;
|
||||||
WXWidget m_formWidget;
|
WXWidget m_formWidget;
|
||||||
wxStringList m_stringList;
|
wxStringList m_stringList;
|
||||||
|
|
||||||
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -24,74 +24,73 @@ WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
|||||||
// Combobox item
|
// Combobox item
|
||||||
class WXDLLEXPORT wxComboBox: public wxChoice
|
class WXDLLEXPORT wxComboBox: public wxChoice
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxComboBox)
|
DECLARE_DYNAMIC_CLASS(wxComboBox)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline wxComboBox() {}
|
inline wxComboBox() {}
|
||||||
~wxComboBox();
|
~wxComboBox();
|
||||||
|
|
||||||
inline wxComboBox(wxWindow *parent, wxWindowID id,
|
inline wxComboBox(wxWindow *parent, wxWindowID id,
|
||||||
const wxString& value = wxEmptyString,
|
const wxString& value = wxEmptyString,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxComboBoxNameStr)
|
const wxString& name = wxComboBoxNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxString& value = wxEmptyString,
|
const wxString& value = wxEmptyString,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxComboBoxNameStr);
|
const wxString& name = wxComboBoxNameStr);
|
||||||
|
|
||||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
// List functions
|
||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual void Append(const wxString& item);
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
virtual void Delete(int n);
|
||||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
virtual void Clear();
|
||||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
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
|
// Text field functions
|
||||||
virtual void Append(const wxString& item);
|
virtual wxString GetValue() const ;
|
||||||
virtual void Delete(int n);
|
virtual void SetValue(const wxString& value);
|
||||||
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
|
// Clipboard operations
|
||||||
virtual wxString GetValue() const ;
|
virtual void Copy();
|
||||||
virtual void SetValue(const wxString& value);
|
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
|
// Implementation
|
||||||
virtual void Copy();
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||||
virtual void Cut();
|
virtual void ChangeBackgroundColour();
|
||||||
virtual void Paste();
|
virtual void ChangeForegroundColour();
|
||||||
virtual void SetInsertionPoint(long pos);
|
WXWidget GetTopWidget() const { return m_mainWidget; }
|
||||||
virtual void SetInsertionPointEnd();
|
WXWidget GetMainWidget() const { return m_mainWidget; }
|
||||||
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
|
protected:
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void DoSetSize(int x, int y,
|
||||||
virtual void ChangeBackgroundColour();
|
int width, int height,
|
||||||
virtual void ChangeForegroundColour();
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
WXWidget GetTopWidget() const { return m_mainWidget; }
|
|
||||||
WXWidget GetMainWidget() const { return m_mainWidget; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -21,99 +21,98 @@
|
|||||||
WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr;
|
||||||
|
|
||||||
// Dialog boxes
|
// Dialog boxes
|
||||||
class WXDLLEXPORT wxDialog: public wxPanel
|
class WXDLLEXPORT wxDialog : public wxPanel
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
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; }
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//// Motif-specific
|
wxDialog();
|
||||||
bool m_modalShowing;
|
|
||||||
wxString m_dialogTitle;
|
|
||||||
|
|
||||||
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
|
#endif
|
||||||
|
@@ -26,185 +26,179 @@ WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr;
|
|||||||
class WXDLLEXPORT wxMenuBar;
|
class WXDLLEXPORT wxMenuBar;
|
||||||
class WXDLLEXPORT wxStatusBar;
|
class WXDLLEXPORT wxStatusBar;
|
||||||
|
|
||||||
class WXDLLEXPORT wxFrame: public wxWindow {
|
class WXDLLEXPORT wxFrame : public wxWindow
|
||||||
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxFrame();
|
wxFrame();
|
||||||
inline wxFrame(wxWindow *parent,
|
wxFrame(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE,
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
const wxString& name = wxFrameNameStr)
|
const wxString& name = wxFrameNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, title, pos, size, style, name);
|
Create(parent, id, title, pos, size, style, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
~wxFrame();
|
~wxFrame();
|
||||||
|
|
||||||
bool Create(wxWindow *parent,
|
bool Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE,
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
const wxString& name = wxFrameNameStr);
|
const wxString& name = wxFrameNameStr);
|
||||||
|
|
||||||
virtual bool Destroy();
|
virtual bool Destroy();
|
||||||
|
|
||||||
void SetClientSize(int width, int height);
|
void SetClientSize(int width, int height);
|
||||||
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
|
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;
|
void ClientToScreen(int *x, int *y) const;
|
||||||
wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
|
wxPoint ClientToScreen(const wxPoint& pt) const { return wxWindow::ClientToScreen(pt); }
|
||||||
|
|
||||||
void GetSize(int *width, int *height) const ;
|
void ScreenToClient(int *x, int *y) const;
|
||||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
wxPoint ScreenToClient(const wxPoint& pt) const { return wxWindow::ScreenToClient(pt); }
|
||||||
|
|
||||||
void GetPosition(int *x, int *y) const ;
|
void OnSize(wxSizeEvent& event);
|
||||||
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
|
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);
|
bool Show(bool show);
|
||||||
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); }
|
|
||||||
|
|
||||||
void ClientToScreen(int *x, int *y) const;
|
// Set menu bar
|
||||||
wxPoint ClientToScreen(const wxPoint& pt) const { return wxWindow::ClientToScreen(pt); }
|
void SetMenuBar(wxMenuBar *menu_bar);
|
||||||
|
virtual wxMenuBar *GetMenuBar() const ;
|
||||||
|
|
||||||
void ScreenToClient(int *x, int *y) const;
|
// Set title
|
||||||
wxPoint ScreenToClient(const wxPoint& pt) const { return wxWindow::ScreenToClient(pt); }
|
void SetTitle(const wxString& title);
|
||||||
|
wxString GetTitle() const { return m_title; }
|
||||||
|
|
||||||
void OnSize(wxSizeEvent& event);
|
void Centre(int direction = wxBOTH);
|
||||||
void OnMenuHighlight(wxMenuEvent& event);
|
|
||||||
void OnActivate(wxActivateEvent& event);
|
|
||||||
void OnIdle(wxIdleEvent& event);
|
|
||||||
void OnCloseWindow(wxCloseEvent& event);
|
|
||||||
|
|
||||||
bool Show(bool show);
|
// Call this to simulate a menu command
|
||||||
|
virtual void Command(int id);
|
||||||
|
virtual void ProcessCommand(int id);
|
||||||
|
|
||||||
// Set menu bar
|
// Set icon
|
||||||
void SetMenuBar(wxMenuBar *menu_bar);
|
virtual void SetIcon(const wxIcon& icon);
|
||||||
virtual wxMenuBar *GetMenuBar() const ;
|
|
||||||
|
|
||||||
// Set title
|
// Create status line
|
||||||
void SetTitle(const wxString& title);
|
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
|
||||||
inline wxString GetTitle() const { return m_title; }
|
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);
|
// Create toolbar
|
||||||
|
|
||||||
// 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
|
|
||||||
#if wxUSE_TOOLBAR
|
#if wxUSE_TOOLBAR
|
||||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxToolBarNameStr);
|
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 *OnCreateToolBar(long style, wxWindowID id, const wxString& name);
|
||||||
// If made known to the frame, the frame will manage it automatically.
|
// If made known to the frame, the frame will manage it automatically.
|
||||||
virtual void SetToolBar(wxToolBar *toolbar) ;
|
virtual void SetToolBar(wxToolBar *toolbar) ;
|
||||||
virtual wxToolBar *GetToolBar() const ;
|
virtual wxToolBar *GetToolBar() const ;
|
||||||
virtual void PositionToolBar();
|
virtual void PositionToolBar();
|
||||||
#endif // wxUSE_TOOLBAR
|
#endif // wxUSE_TOOLBAR
|
||||||
|
|
||||||
// Set status line text
|
// Set status line text
|
||||||
virtual void SetStatusText(const wxString& text, int number = 0);
|
virtual void SetStatusText(const wxString& text, int number = 0);
|
||||||
|
|
||||||
// Set status line widths
|
// Set status line widths
|
||||||
virtual void SetStatusWidths(int n, const int widths_field[]);
|
virtual void SetStatusWidths(int n, const int widths_field[]);
|
||||||
|
|
||||||
// Hint to tell framework which status bar to use
|
// Hint to tell framework which status bar to use
|
||||||
// TODO: should this go into a wxFrameworkSettings class perhaps?
|
// TODO: should this go into a wxFrameworkSettings class perhaps?
|
||||||
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
|
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
|
||||||
static bool UsesNativeStatusBar() { return m_useNativeStatusBar; };
|
static bool UsesNativeStatusBar() { return m_useNativeStatusBar; };
|
||||||
|
|
||||||
// Fit frame around subwindows
|
// Fit frame around subwindows
|
||||||
virtual void Fit();
|
virtual void Fit();
|
||||||
|
|
||||||
// Iconize
|
// Iconize
|
||||||
virtual void Iconize(bool iconize);
|
virtual void Iconize(bool iconize);
|
||||||
|
|
||||||
virtual bool IsIconized() const ;
|
virtual bool IsIconized() const ;
|
||||||
|
|
||||||
// Compatibility
|
// Compatibility
|
||||||
inline bool Iconized() const { return IsIconized(); }
|
bool Iconized() const { return IsIconized(); }
|
||||||
|
|
||||||
// Is the frame maximized? Returns FALSE under Motif (but TRUE for
|
// Is the frame maximized? Returns FALSE under Motif (but TRUE for
|
||||||
// wxMDIChildFrame due to the tabbed implementation).
|
// wxMDIChildFrame due to the tabbed implementation).
|
||||||
virtual bool IsMaximized(void) const ;
|
virtual bool IsMaximized(void) const ;
|
||||||
|
|
||||||
virtual void Maximize(bool maximize);
|
virtual void Maximize(bool maximize);
|
||||||
|
|
||||||
// Responds to colour changes
|
// Responds to colour changes
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||||
|
|
||||||
// Query app for menu item updates (called from OnIdle)
|
// Query app for menu item updates (called from OnIdle)
|
||||||
void DoMenuUpdates();
|
void DoMenuUpdates();
|
||||||
void DoMenuUpdates(wxMenu* menu);
|
void DoMenuUpdates(wxMenu* menu);
|
||||||
|
|
||||||
// Checks if there is a toolbar, and returns the first free client position
|
// Checks if there is a toolbar, and returns the first free client position
|
||||||
virtual wxPoint GetClientAreaOrigin() const;
|
virtual wxPoint GetClientAreaOrigin() const;
|
||||||
|
|
||||||
virtual void Raise();
|
virtual void Raise();
|
||||||
virtual void Lower();
|
virtual void Lower();
|
||||||
|
|
||||||
virtual void CaptureMouse();
|
virtual void CaptureMouse();
|
||||||
virtual void ReleaseMouse();
|
virtual void ReleaseMouse();
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||||
virtual void ChangeBackgroundColour();
|
virtual void ChangeBackgroundColour();
|
||||||
virtual void ChangeForegroundColour();
|
virtual void ChangeForegroundColour();
|
||||||
WXWidget GetMenuBarWidget() const ;
|
WXWidget GetMenuBarWidget() const ;
|
||||||
inline WXWidget GetShellWidget() const { return m_frameShell; }
|
WXWidget GetShellWidget() const { return m_frameShell; }
|
||||||
inline WXWidget GetWorkAreaWidget() const { return m_workArea; }
|
WXWidget GetWorkAreaWidget() const { return m_workArea; }
|
||||||
inline WXWidget GetClientAreaWidget() const { return m_clientArea; }
|
WXWidget GetClientAreaWidget() const { return m_clientArea; }
|
||||||
inline WXWidget GetTopWidget() const { return m_frameShell; }
|
WXWidget GetTopWidget() const { return m_frameShell; }
|
||||||
inline WXWidget GetMainWindowWidget() const { return m_frameWidget; }
|
WXWidget GetMainWindowWidget() const { return m_frameWidget; }
|
||||||
|
|
||||||
// The widget that can have children on it
|
// The widget that can have children on it
|
||||||
WXWidget GetClientWidget() const;
|
WXWidget GetClientWidget() const;
|
||||||
bool GetVisibleStatus() const { return m_visibleStatus; }
|
bool GetVisibleStatus() const { return m_visibleStatus; }
|
||||||
|
|
||||||
bool PreResize();
|
bool PreResize();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxMenuBar * m_frameMenuBar;
|
wxMenuBar * m_frameMenuBar;
|
||||||
wxStatusBar * m_frameStatusBar;
|
wxStatusBar * m_frameStatusBar;
|
||||||
wxIcon m_icon;
|
wxIcon m_icon;
|
||||||
bool m_iconized;
|
bool m_iconized;
|
||||||
static bool m_useNativeStatusBar;
|
static bool m_useNativeStatusBar;
|
||||||
|
|
||||||
#if wxUSE_TOOLBAR
|
#if wxUSE_TOOLBAR
|
||||||
wxToolBar * m_frameToolBar ;
|
wxToolBar * m_frameToolBar ;
|
||||||
#endif // wxUSE_TOOLBAR
|
#endif // wxUSE_TOOLBAR
|
||||||
|
|
||||||
//// Motif-specific
|
//// Motif-specific
|
||||||
|
|
||||||
WXWidget m_frameShell;
|
WXWidget m_frameShell;
|
||||||
WXWidget m_frameWidget;
|
WXWidget m_frameWidget;
|
||||||
WXWidget m_workArea;
|
WXWidget m_workArea;
|
||||||
WXWidget m_clientArea;
|
WXWidget m_clientArea;
|
||||||
// WXWidget m_menuBarWidget;
|
// WXWidget m_menuBarWidget;
|
||||||
bool m_visibleStatus;
|
bool m_visibleStatus;
|
||||||
wxString m_title;
|
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
|
#endif
|
||||||
|
@@ -21,57 +21,52 @@
|
|||||||
WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
|
||||||
|
|
||||||
// Group box
|
// Group box
|
||||||
class WXDLLEXPORT wxGauge: public wxControl
|
class WXDLLEXPORT wxGauge : public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxGauge)
|
DECLARE_DYNAMIC_CLASS(wxGauge)
|
||||||
public:
|
|
||||||
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
|
|
||||||
|
|
||||||
inline wxGauge(wxWindow *parent, wxWindowID id,
|
public:
|
||||||
int range,
|
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
inline wxGauge(wxWindow *parent, wxWindowID id,
|
||||||
int range,
|
int range,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxGA_HORIZONTAL,
|
long style = wxGA_HORIZONTAL,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxGaugeNameStr);
|
const wxString& name = wxGaugeNameStr)
|
||||||
|
{
|
||||||
|
Create(parent, id, range, pos, size, style, validator, name);
|
||||||
|
}
|
||||||
|
|
||||||
void SetShadowWidth(int w);
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
void SetBezelFace(int w);
|
int range,
|
||||||
void SetRange(int r);
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
void SetValue(int pos);
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxGA_HORIZONTAL,
|
||||||
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
|
const wxString& name = wxGaugeNameStr);
|
||||||
|
|
||||||
int GetShadowWidth() const ;
|
void SetShadowWidth(int w);
|
||||||
int GetBezelFace() const ;
|
void SetBezelFace(int w);
|
||||||
int GetRange() const ;
|
void SetRange(int r);
|
||||||
int GetValue() const ;
|
void SetValue(int pos);
|
||||||
|
|
||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
int GetShadowWidth() const ;
|
||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
int GetBezelFace() const ;
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
int GetRange() const ;
|
||||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
int GetValue() const ;
|
||||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
|
||||||
|
|
||||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||||
virtual void ChangeBackgroundColour();
|
virtual void ChangeBackgroundColour();
|
||||||
virtual void ChangeForegroundColour();
|
virtual void ChangeForegroundColour();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_rangeMax;
|
int m_rangeMax;
|
||||||
int m_gaugePos;
|
int m_gaugePos;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -28,86 +28,84 @@ WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
|||||||
// List box item
|
// List box item
|
||||||
class WXDLLEXPORT wxListBox: public wxControl
|
class WXDLLEXPORT wxListBox: public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||||
public:
|
|
||||||
|
|
||||||
wxListBox();
|
public:
|
||||||
inline wxListBox(wxWindow *parent, wxWindowID id,
|
wxListBox();
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
wxListBox(wxWindow *parent, wxWindowID id,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
long style = 0,
|
||||||
const wxString& name = wxListBoxNameStr):
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
m_clientDataList(wxKEY_INTEGER)
|
const wxString& name = wxListBoxNameStr):
|
||||||
{
|
m_clientDataList(wxKEY_INTEGER)
|
||||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
{
|
||||||
}
|
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||||
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxListBoxNameStr);
|
const wxString& name = wxListBoxNameStr);
|
||||||
|
|
||||||
~wxListBox();
|
~wxListBox();
|
||||||
|
|
||||||
virtual void Append(const wxString& item);
|
virtual void Append(const wxString& item);
|
||||||
virtual void Append(const wxString& item, char *clientData);
|
virtual void Append(const wxString& item, char *clientData);
|
||||||
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
|
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
|
||||||
virtual int FindString(const wxString& s) const ;
|
virtual int FindString(const wxString& s) const ;
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
virtual void SetSelection(int n, bool select = TRUE);
|
virtual void SetSelection(int n, bool select = TRUE);
|
||||||
|
|
||||||
virtual void Deselect(int n);
|
virtual void Deselect(int n);
|
||||||
|
|
||||||
// For single choice list item only
|
// For single choice list item only
|
||||||
virtual int GetSelection() const ;
|
virtual int GetSelection() const ;
|
||||||
virtual void Delete(int n);
|
virtual void Delete(int n);
|
||||||
virtual char *GetClientData(int n) const ;
|
virtual char *GetClientData(int n) const ;
|
||||||
virtual void *GetClientData() { return wxWindow::GetClientData(); }
|
virtual void *GetClientData() { return wxWindow::GetClientData(); }
|
||||||
virtual void SetClientData(int n, char *clientData);
|
virtual void SetClientData(int n, char *clientData);
|
||||||
virtual void SetClientData( void *data ) { wxWindow::SetClientData(data); }
|
virtual void SetClientData( void *data ) { wxWindow::SetClientData(data); }
|
||||||
virtual void SetString(int n, const wxString& s);
|
virtual void SetString(int n, const wxString& s);
|
||||||
|
|
||||||
// For single or multiple choice list item
|
// For single or multiple choice list item
|
||||||
virtual int GetSelections(wxArrayInt& aSelections) const;
|
virtual int GetSelections(wxArrayInt& aSelections) const;
|
||||||
virtual bool Selected(int n) const ;
|
virtual bool Selected(int n) const ;
|
||||||
virtual wxString GetString(int n) const ;
|
virtual wxString GetString(int n) const ;
|
||||||
|
|
||||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
// Set the specified item at the first visible item
|
||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
// or scroll to max range.
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
virtual void SetFirstItem(int n) ;
|
||||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
virtual void SetFirstItem(const wxString& s) ;
|
||||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
|
||||||
|
|
||||||
// Set the specified item at the first visible item
|
virtual void InsertItems(int nItems, const wxString items[], int pos);
|
||||||
// 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 wxString GetStringSelection() const ;
|
||||||
|
virtual bool SetStringSelection(const wxString& s, bool flag = TRUE);
|
||||||
|
virtual int Number() const ;
|
||||||
|
|
||||||
virtual wxString GetStringSelection() const ;
|
void Command(wxCommandEvent& event);
|
||||||
virtual bool SetStringSelection(const wxString& s, bool flag = TRUE);
|
|
||||||
virtual int Number() const ;
|
|
||||||
|
|
||||||
void Command(wxCommandEvent& event);
|
// Implementation
|
||||||
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||||
// Implementation
|
virtual void ChangeBackgroundColour();
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeForegroundColour();
|
||||||
virtual void ChangeBackgroundColour();
|
WXWidget GetTopWidget() const;
|
||||||
virtual void ChangeForegroundColour();
|
|
||||||
WXWidget GetTopWidget() const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_noItems;
|
int m_noItems;
|
||||||
int m_selected;
|
int m_selected;
|
||||||
|
|
||||||
// List mapping positions->client data
|
// List mapping positions->client data
|
||||||
wxList m_clientDataList;
|
wxList m_clientDataList;
|
||||||
|
|
||||||
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -117,91 +117,83 @@ DECLARE_EVENT_TABLE()
|
|||||||
class WXDLLEXPORT wxMDIChildFrame: public wxFrame
|
class WXDLLEXPORT wxMDIChildFrame: public wxFrame
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
|
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
|
||||||
|
|
||||||
public:
|
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();
|
~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();
|
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,
|
// Set menu bar
|
||||||
wxWindowID id,
|
void SetMenuBar(wxMenuBar *menu_bar);
|
||||||
const wxString& title,
|
void SetTitle(const wxString& title);
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
|
||||||
const wxSize& size = wxDefaultSize,
|
|
||||||
long style = wxDEFAULT_FRAME_STYLE,
|
|
||||||
const wxString& name = wxFrameNameStr);
|
|
||||||
|
|
||||||
// Set menu bar
|
void SetClientSize(int width, int height);
|
||||||
void SetMenuBar(wxMenuBar *menu_bar);
|
void GetClientSize(int *width, int *height);
|
||||||
void SetTitle(const wxString& title);
|
void GetSize(int *width, int *height) const;
|
||||||
|
void GetPosition(int *x, int *y) const ;
|
||||||
|
|
||||||
void SetClientSize(int width, int height);
|
// Set icon
|
||||||
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
|
virtual void SetIcon(const wxIcon& icon);
|
||||||
|
|
||||||
void GetClientSize(int *width, int *height) const;
|
// Override wxFrame operations
|
||||||
wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
|
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);
|
// MDI operations
|
||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual void Maximize();
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
virtual void Maximize(bool WXUNUSED(maximize)) { };
|
||||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
inline void Minimize() { Iconize(TRUE); };
|
||||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
virtual void Iconize(bool iconize);
|
||||||
|
virtual void Restore();
|
||||||
|
virtual void Activate();
|
||||||
|
virtual bool IsIconized() const ;
|
||||||
|
|
||||||
void GetSize(int *width, int *height) const;
|
// Is the frame maximized? Returns TRUE for
|
||||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
// wxMDIChildFrame due to the tabbed implementation.
|
||||||
|
virtual bool IsMaximized(void) const ;
|
||||||
|
|
||||||
void GetPosition(int *x, int *y) const ;
|
bool Show(bool show);
|
||||||
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
|
|
||||||
|
|
||||||
// Set icon
|
WXWidget GetMainWidget() const { return m_mainWidget; };
|
||||||
virtual void SetIcon(const wxIcon& icon);
|
WXWidget GetTopWidget() const { return m_mainWidget; };
|
||||||
|
WXWidget GetClientWidget() const { return m_mainWidget; };
|
||||||
|
|
||||||
// Override wxFrame operations
|
/*
|
||||||
void CaptureMouse();
|
virtual void OnRaise();
|
||||||
void ReleaseMouse();
|
virtual void OnLower();
|
||||||
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);
|
|
||||||
|
|
||||||
// MDI operations
|
void SetMDIParentFrame(wxMDIParentFrame* parentFrame) { m_mdiParentFrame = parentFrame; }
|
||||||
virtual void Maximize();
|
wxMDIParentFrame* GetMDIParentFrame() const { return m_mdiParentFrame; }
|
||||||
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; }
|
|
||||||
|
|
||||||
protected:
|
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
|
/* The client window is a child of the parent MDI frame, and itself
|
||||||
@@ -213,47 +205,38 @@ protected:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxMDIClientWindow: public wxNotebook
|
class WXDLLEXPORT wxMDIClientWindow: public wxNotebook
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
|
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
|
||||||
public:
|
|
||||||
|
|
||||||
wxMDIClientWindow() ;
|
public:
|
||||||
inline wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0)
|
wxMDIClientWindow() ;
|
||||||
{
|
wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0)
|
||||||
CreateClient(parent, style);
|
{
|
||||||
}
|
CreateClient(parent, style);
|
||||||
|
}
|
||||||
|
|
||||||
~wxMDIClientWindow();
|
~wxMDIClientWindow();
|
||||||
|
|
||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
void GetClientSize(int *width, int *height) const;
|
||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
void GetSize(int *width, int *height) const ;
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
void GetPosition(int *x, int *y) const ;
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
|
||||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
|
||||||
|
|
||||||
void SetClientSize(int width, int height);
|
// Note: this is virtual, to allow overridden behaviour.
|
||||||
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
|
virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
|
||||||
|
|
||||||
void GetClientSize(int *width, int *height) const;
|
// Explicitly call default scroll behaviour
|
||||||
wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
|
void OnScroll(wxScrollEvent& event);
|
||||||
|
|
||||||
void GetSize(int *width, int *height) const ;
|
// Implementation
|
||||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
void OnPageChanged(wxNotebookEvent& event);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
protected:
|
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
|
#endif
|
||||||
|
@@ -23,77 +23,77 @@ WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr;
|
|||||||
// List box item
|
// List box item
|
||||||
class WXDLLEXPORT wxBitmap ;
|
class WXDLLEXPORT wxBitmap ;
|
||||||
|
|
||||||
class WXDLLEXPORT wxRadioBox: public wxControl
|
class WXDLLEXPORT wxRadioBox : public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxRadioBox();
|
wxRadioBox();
|
||||||
|
|
||||||
inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
|
wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
||||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
|
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
|
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
~wxRadioBox();
|
~wxRadioBox();
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
||||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
|
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
|
||||||
|
|
||||||
int FindString(const wxString& s) const;
|
int FindString(const wxString& s) const;
|
||||||
void SetSelection(int N);
|
void SetSelection(int N);
|
||||||
int GetSelection() const;
|
int GetSelection() const;
|
||||||
wxString GetString(int N) 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); }
|
|
||||||
|
|
||||||
void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
|
void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
|
||||||
void SetLabel(int item, const wxString& label) ;
|
void SetLabel(int item, const wxString& label) ;
|
||||||
wxString GetLabel(int item) const;
|
wxString GetLabel(int item) const;
|
||||||
wxString GetLabel() const { return wxControl::GetLabel(); };
|
wxString GetLabel() const { return wxControl::GetLabel(); };
|
||||||
void Enable(bool enable);
|
void Enable(bool enable);
|
||||||
void Enable(int item, bool enable);
|
void Enable(int item, bool enable);
|
||||||
void Show(int item, bool show) ;
|
void Show(int item, bool show) ;
|
||||||
bool Show(bool show) ;
|
bool Show(bool show) ;
|
||||||
|
|
||||||
virtual wxString GetStringSelection() const;
|
virtual wxString GetStringSelection() const;
|
||||||
virtual bool SetStringSelection(const wxString& s);
|
virtual bool SetStringSelection(const wxString& s);
|
||||||
inline virtual int Number() const { return m_noItems; } ;
|
virtual int Number() const { return m_noItems; } ;
|
||||||
void Command(wxCommandEvent& event);
|
void Command(wxCommandEvent& event);
|
||||||
|
|
||||||
inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
|
|
||||||
inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
|
||||||
|
|
||||||
// Implementation
|
int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
||||||
virtual void ChangeBackgroundColour();
|
|
||||||
virtual void ChangeForegroundColour();
|
// Implementation
|
||||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||||
WXWidget GetLabelWidget() const { return m_labelWidget; }
|
virtual void ChangeBackgroundColour();
|
||||||
WXWidget GetFrameWidget() const { return m_frameWidget; }
|
virtual void ChangeForegroundColour();
|
||||||
inline WXWidget* GetRadioButtons() const { return m_radioButtons; }
|
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||||
inline void SetSel(int i) { m_selectedButton = i; }
|
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:
|
protected:
|
||||||
int m_majorDim ;
|
int m_majorDim ;
|
||||||
int m_noItems;
|
int m_noItems;
|
||||||
int m_noRowsOrCols;
|
int m_noRowsOrCols;
|
||||||
int m_selectedButton;
|
int m_selectedButton;
|
||||||
|
|
||||||
WXWidget m_formWidget;
|
WXWidget m_formWidget;
|
||||||
WXWidget m_labelWidget;
|
WXWidget m_labelWidget;
|
||||||
WXWidget m_frameWidget;
|
WXWidget m_frameWidget;
|
||||||
WXWidget* m_radioButtons;
|
WXWidget* m_radioButtons;
|
||||||
wxString* m_radioButtonLabels;
|
wxString* m_radioButtonLabels;
|
||||||
|
|
||||||
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -23,78 +23,78 @@ WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
|
|||||||
// Slider
|
// Slider
|
||||||
class WXDLLEXPORT wxSlider: public wxControl
|
class WXDLLEXPORT wxSlider: public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxSlider)
|
DECLARE_DYNAMIC_CLASS(wxSlider)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxSlider();
|
wxSlider();
|
||||||
|
|
||||||
inline wxSlider(wxWindow *parent, wxWindowID id,
|
wxSlider(wxWindow *parent, wxWindowID id,
|
||||||
int value, int minValue, int maxValue,
|
int value, int minValue, int maxValue,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxSL_HORIZONTAL,
|
long style = wxSL_HORIZONTAL,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxSliderNameStr)
|
const wxString& name = wxSliderNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
~wxSlider();
|
~wxSlider();
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
int value, int minValue, int maxValue,
|
int value, int minValue, int maxValue,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxSL_HORIZONTAL,
|
long style = wxSL_HORIZONTAL,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxSliderNameStr);
|
const wxString& name = wxSliderNameStr);
|
||||||
|
|
||||||
virtual int GetValue() const ;
|
virtual int GetValue() const ;
|
||||||
virtual void SetValue(int);
|
virtual void SetValue(int);
|
||||||
void GetSize(int *x, int *y) const ;
|
|
||||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
|
||||||
|
|
||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
void GetSize(int *x, int *y) const ;
|
||||||
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 SetRange(int minValue, int maxValue);
|
void SetRange(int minValue, int maxValue);
|
||||||
|
|
||||||
inline int GetMin() const { return m_rangeMin; }
|
inline int GetMin() const { return m_rangeMin; }
|
||||||
inline int GetMax() const { return m_rangeMax; }
|
inline int GetMax() const { return m_rangeMax; }
|
||||||
|
|
||||||
// For trackbars only
|
// For trackbars only
|
||||||
void SetTickFreq(int n, int pos);
|
void SetTickFreq(int n, int pos);
|
||||||
inline int GetTickFreq() const { return m_tickFreq; }
|
inline int GetTickFreq() const { return m_tickFreq; }
|
||||||
void SetPageSize(int pageSize);
|
void SetPageSize(int pageSize);
|
||||||
int GetPageSize() const ;
|
int GetPageSize() const ;
|
||||||
void ClearSel() ;
|
void ClearSel() ;
|
||||||
void ClearTicks() ;
|
void ClearTicks() ;
|
||||||
void SetLineSize(int lineSize);
|
void SetLineSize(int lineSize);
|
||||||
int GetLineSize() const ;
|
int GetLineSize() const ;
|
||||||
int GetSelEnd() const ;
|
int GetSelEnd() const ;
|
||||||
int GetSelStart() const ;
|
int GetSelStart() const ;
|
||||||
void SetSelection(int minPos, int maxPos);
|
void SetSelection(int minPos, int maxPos);
|
||||||
void SetThumbLength(int len) ;
|
void SetThumbLength(int len) ;
|
||||||
int GetThumbLength() const ;
|
int GetThumbLength() const ;
|
||||||
void SetTick(int tickPos) ;
|
void SetTick(int tickPos) ;
|
||||||
|
|
||||||
void Command(wxCommandEvent& event);
|
void Command(wxCommandEvent& event);
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||||
virtual void ChangeBackgroundColour();
|
virtual void ChangeBackgroundColour();
|
||||||
virtual void ChangeForegroundColour();
|
virtual void ChangeForegroundColour();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_rangeMin;
|
int m_rangeMin;
|
||||||
int m_rangeMax;
|
int m_rangeMax;
|
||||||
int m_pageSize;
|
int m_pageSize;
|
||||||
int m_lineSize;
|
int m_lineSize;
|
||||||
int m_tickFreq;
|
int m_tickFreq;
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -20,54 +20,48 @@
|
|||||||
|
|
||||||
WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
|
||||||
|
|
||||||
class WXDLLEXPORT wxStaticBitmap: public wxControl
|
class WXDLLEXPORT wxStaticBitmap : public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
||||||
public:
|
|
||||||
inline wxStaticBitmap() { }
|
|
||||||
~wxStaticBitmap();
|
|
||||||
|
|
||||||
inline wxStaticBitmap(wxWindow *parent, wxWindowID id,
|
public:
|
||||||
const wxBitmap& label,
|
wxStaticBitmap() { }
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
~wxStaticBitmap();
|
||||||
const wxSize& size = wxDefaultSize,
|
|
||||||
long style = 0,
|
|
||||||
const wxString& name = wxStaticBitmapNameStr)
|
|
||||||
{
|
|
||||||
Create(parent, id, label, pos, size, style, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
wxStaticBitmap(wxWindow *parent, wxWindowID id,
|
||||||
const wxBitmap& label,
|
const wxBitmap& label,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString& name = wxStaticBitmapNameStr);
|
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 SetBitmap(const wxBitmap& bitmap);
|
||||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
|
||||||
|
|
||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||||
{ 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); }
|
|
||||||
|
|
||||||
inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
|
wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
|
||||||
|
|
||||||
// overriden base class virtuals
|
// overriden base class virtuals
|
||||||
virtual bool AcceptsFocus() const { return FALSE; }
|
virtual bool AcceptsFocus() const { return FALSE; }
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||||
virtual void ChangeBackgroundColour();
|
virtual void ChangeBackgroundColour();
|
||||||
virtual void ChangeForegroundColour();
|
virtual void ChangeForegroundColour();
|
||||||
|
|
||||||
protected:
|
|
||||||
wxBitmap m_messageBitmap;
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxBitmap m_messageBitmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -23,53 +23,52 @@ WXDLLEXPORT_DATA(extern const char*) wxStaticBoxNameStr;
|
|||||||
// Group box
|
// Group box
|
||||||
class WXDLLEXPORT wxStaticBox: public wxControl
|
class WXDLLEXPORT wxStaticBox: public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxStaticBox();
|
wxStaticBox();
|
||||||
inline wxStaticBox(wxWindow *parent, wxWindowID id,
|
wxStaticBox(wxWindow *parent, wxWindowID id,
|
||||||
const wxString& label,
|
const wxString& label,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString& name = wxStaticBoxNameStr)
|
const wxString& name = wxStaticBoxNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, label, pos, size, style, name);
|
Create(parent, id, label, pos, size, style, name);
|
||||||
}
|
}
|
||||||
~wxStaticBox();
|
~wxStaticBox();
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxString& label,
|
const wxString& label,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString& name = wxStaticBoxNameStr);
|
const wxString& name = wxStaticBoxNameStr);
|
||||||
|
|
||||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||||
|
|
||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
void SetLabel(const wxString& label);
|
||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
wxString GetLabel() const;
|
||||||
{ 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);
|
// Implementation
|
||||||
wxString GetLabel() const;
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||||
|
virtual void ChangeBackgroundColour();
|
||||||
// Implementation
|
virtual void ChangeForegroundColour();
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||||
virtual void ChangeBackgroundColour();
|
WXWidget GetLabelWidget() const { return m_labelWidget; }
|
||||||
virtual void ChangeForegroundColour();
|
|
||||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
|
||||||
WXWidget GetLabelWidget() const { return m_labelWidget; }
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Motif-specific
|
// Motif-specific
|
||||||
WXWidget m_formWidget;
|
WXWidget m_formWidget;
|
||||||
WXWidget m_labelWidget;
|
WXWidget m_labelWidget;
|
||||||
|
|
||||||
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -22,38 +22,39 @@
|
|||||||
WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
|
||||||
|
|
||||||
// Pushbutton
|
// Pushbutton
|
||||||
class WXDLLEXPORT wxButton: public wxControl
|
class WXDLLEXPORT wxButton : public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxButton)
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
public:
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
wxButton() { }
|
||||||
const wxSize& size = wxDefaultSize, long style = 0,
|
wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxString& name = wxButtonNameStr);
|
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);
|
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
|
const wxString& name = wxButtonNameStr);
|
||||||
|
|
||||||
virtual void SetDefault(void);
|
virtual void SetDefault();
|
||||||
virtual void SetLabel(const wxString& label);
|
virtual void SetLabel(const wxString& label);
|
||||||
virtual wxString GetLabel(void) const ;
|
virtual wxString GetLabel() const ;
|
||||||
virtual void Command(wxCommandEvent& event);
|
virtual void Command(wxCommandEvent& event);
|
||||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -22,71 +22,75 @@ WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
|
|||||||
|
|
||||||
// Checkbox item (single checkbox)
|
// Checkbox item (single checkbox)
|
||||||
class WXDLLEXPORT wxBitmap;
|
class WXDLLEXPORT wxBitmap;
|
||||||
class WXDLLEXPORT wxCheckBox: public wxControl
|
class WXDLLEXPORT wxCheckBox : public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline wxCheckBox(void) { }
|
wxCheckBox() { }
|
||||||
inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
|
wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = 0,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxCheckBoxNameStr)
|
const wxString& name = wxCheckBoxNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, label, pos, size, style, validator, name);
|
Create(parent, id, label, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = 0,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxCheckBoxNameStr);
|
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); }
|
|
||||||
|
|
||||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
virtual void SetValue(bool value);
|
||||||
virtual void SetLabel(const wxString& label);
|
virtual bool GetValue() const ;
|
||||||
virtual void Command(wxCommandEvent& event);
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
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
|
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
|
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int checkWidth ;
|
int checkWidth ;
|
||||||
int checkHeight ;
|
int checkHeight ;
|
||||||
|
|
||||||
inline wxBitmapCheckBox(void) { checkWidth = -1; checkHeight = -1; }
|
wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
|
||||||
inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = 0,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxCheckBoxNameStr)
|
const wxString& name = wxCheckBoxNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, label, pos, size, style, validator, name);
|
Create(parent, id, label, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
|
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = 0,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxCheckBoxNameStr);
|
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); }
|
|
||||||
|
|
||||||
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
|
#endif
|
||||||
// _WX_CHECKBOX_H_
|
// _WX_CHECKBOX_H_
|
||||||
|
@@ -23,60 +23,59 @@ WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
|
|||||||
// Choice item
|
// Choice item
|
||||||
class WXDLLEXPORT wxChoice: public wxControl
|
class WXDLLEXPORT wxChoice: public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxChoice)
|
DECLARE_DYNAMIC_CLASS(wxChoice)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline wxChoice(void) { m_noStrings = 0; }
|
wxChoice() { m_noStrings = 0; }
|
||||||
|
|
||||||
inline wxChoice(wxWindow *parent, wxWindowID id,
|
wxChoice(wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxChoiceNameStr)
|
const wxString& name = wxChoiceNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxChoiceNameStr);
|
const wxString& name = wxChoiceNameStr);
|
||||||
|
|
||||||
virtual void Append(const wxString& item);
|
virtual void Append(const wxString& item);
|
||||||
virtual void Delete(int n);
|
virtual void Delete(int n);
|
||||||
virtual void Clear(void);
|
virtual void Clear();
|
||||||
virtual int GetSelection(void) const ;
|
virtual int GetSelection() const ;
|
||||||
virtual void SetSelection(int n);
|
virtual void SetSelection(int n);
|
||||||
virtual int FindString(const wxString& s) const;
|
virtual int FindString(const wxString& s) const;
|
||||||
virtual wxString GetString(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 wxString GetStringSelection() const ;
|
||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual bool SetStringSelection(const wxString& sel);
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
|
||||||
virtual wxString GetStringSelection(void) const ;
|
|
||||||
virtual bool SetStringSelection(const wxString& sel);
|
|
||||||
|
|
||||||
virtual inline int Number(void) const { return m_noStrings; }
|
virtual int Number() const { return m_noStrings; }
|
||||||
virtual void Command(wxCommandEvent& event);
|
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 void SetColumns(int WXUNUSED(n) = 1 ) { /* No effect */ }
|
||||||
virtual inline int GetColumns(void) const { return 1 ; };
|
virtual int GetColumns() const { return 1 ; }
|
||||||
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_noStrings;
|
int m_noStrings;
|
||||||
|
|
||||||
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -56,23 +56,9 @@ public:
|
|||||||
|
|
||||||
virtual bool Destroy();
|
virtual bool Destroy();
|
||||||
|
|
||||||
void SetClientSize(int width, int height);
|
|
||||||
void SetClientSize(const wxSize& sz) { wxWindow::SetClientSize(sz); }
|
|
||||||
|
|
||||||
void GetClientSize(int *width, int *height) const;
|
void GetClientSize(int *width, int *height) const;
|
||||||
wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
|
|
||||||
|
|
||||||
void GetSize(int *width, int *height) const ;
|
void GetSize(int *width, int *height) const ;
|
||||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
|
||||||
|
|
||||||
void GetPosition(int *x, int *y) const ;
|
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;
|
virtual void ClientToScreen(int *x, int *y) const;
|
||||||
|
|
||||||
@@ -208,6 +194,11 @@ protected:
|
|||||||
WXHWND m_hwndToolTip;
|
WXHWND m_hwndToolTip;
|
||||||
#endif // tooltips
|
#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:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
@@ -21,59 +21,59 @@
|
|||||||
WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
|
||||||
|
|
||||||
// Group box
|
// Group box
|
||||||
class WXDLLEXPORT wxGauge95: public wxControl
|
class WXDLLEXPORT wxGauge95 : public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxGauge95)
|
DECLARE_DYNAMIC_CLASS(wxGauge95)
|
||||||
public:
|
|
||||||
inline wxGauge95(void) { m_rangeMax = 0; m_gaugePos = 0; }
|
|
||||||
|
|
||||||
inline wxGauge95(wxWindow *parent, wxWindowID id,
|
public:
|
||||||
int range,
|
wxGauge95(void) { m_rangeMax = 0; m_gaugePos = 0; }
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
wxGauge95(wxWindow *parent, wxWindowID id,
|
||||||
int range,
|
int range,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxGA_HORIZONTAL,
|
long style = wxGA_HORIZONTAL,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxGaugeNameStr);
|
const wxString& name = wxGaugeNameStr)
|
||||||
|
{
|
||||||
|
Create(parent, id, range, pos, size, style, validator, name);
|
||||||
|
}
|
||||||
|
|
||||||
void SetShadowWidth(int w);
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
void SetBezelFace(int w);
|
int range,
|
||||||
void SetRange(int r);
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
void SetValue(int pos);
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxGA_HORIZONTAL,
|
||||||
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
|
const wxString& name = wxGaugeNameStr);
|
||||||
|
|
||||||
int GetShadowWidth(void) const ;
|
void SetShadowWidth(int w);
|
||||||
int GetBezelFace(void) const ;
|
void SetBezelFace(int w);
|
||||||
int GetRange(void) const ;
|
void SetRange(int r);
|
||||||
int GetValue(void) const ;
|
void SetValue(int pos);
|
||||||
|
|
||||||
void SetForegroundColour(const wxColour& col);
|
int GetShadowWidth(void) const ;
|
||||||
void SetBackgroundColour(const wxColour& col);
|
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
|
#if WXWIN_COMPATIBILITY
|
||||||
inline void SetButtonColour(const wxColour& col) { SetForegroundColour(col); }
|
void SetButtonColour(const wxColour& col) { SetForegroundColour(col); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
||||||
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)) {} ;
|
protected:
|
||||||
|
int m_rangeMax;
|
||||||
|
int m_gaugePos;
|
||||||
|
|
||||||
protected:
|
virtual void DoSetSize(int x, int y,
|
||||||
int m_rangeMax;
|
int width, int height,
|
||||||
int m_gaugePos;
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -23,57 +23,57 @@ WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
|
|||||||
// Group box
|
// Group box
|
||||||
class WXDLLEXPORT wxGaugeMSW: public wxControl
|
class WXDLLEXPORT wxGaugeMSW: public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxGaugeMSW)
|
DECLARE_DYNAMIC_CLASS(wxGaugeMSW)
|
||||||
public:
|
|
||||||
inline wxGaugeMSW(void) { m_rangeMax = 0; m_gaugePos = 0; }
|
|
||||||
|
|
||||||
inline wxGaugeMSW(wxWindow *parent, wxWindowID id,
|
public:
|
||||||
int range,
|
wxGaugeMSW(void) { m_rangeMax = 0; m_gaugePos = 0; }
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
wxGaugeMSW(wxWindow *parent, wxWindowID id,
|
||||||
int range,
|
int range,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxGA_HORIZONTAL,
|
long style = wxGA_HORIZONTAL,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxGaugeNameStr);
|
const wxString& name = wxGaugeNameStr)
|
||||||
|
{
|
||||||
|
Create(parent, id, range, pos, size, style, validator, name);
|
||||||
|
}
|
||||||
|
|
||||||
void SetShadowWidth(int w);
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
void SetBezelFace(int w);
|
int range,
|
||||||
void SetRange(int r);
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
void SetValue(int pos);
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxGA_HORIZONTAL,
|
||||||
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
|
const wxString& name = wxGaugeNameStr);
|
||||||
|
|
||||||
int GetShadowWidth(void) const ;
|
void SetShadowWidth(int w);
|
||||||
int GetBezelFace(void) const ;
|
void SetBezelFace(int w);
|
||||||
int GetRange(void) const ;
|
void SetRange(int r);
|
||||||
int GetValue(void) const ;
|
void SetValue(int pos);
|
||||||
|
|
||||||
void SetForegroundColour(const wxColour& col);
|
int GetShadowWidth(void) const ;
|
||||||
void SetBackgroundColour(const wxColour& col);
|
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
|
#if WXWIN_COMPATIBILITY
|
||||||
inline void SetButtonColour(const wxColour& col) { SetForegroundColour(col); }
|
void SetButtonColour(const wxColour& col) { SetForegroundColour(col); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
||||||
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)) {} ;
|
protected:
|
||||||
|
int m_rangeMax;
|
||||||
|
int m_gaugePos;
|
||||||
|
|
||||||
protected:
|
virtual void DoSetSize(int x, int y,
|
||||||
int m_rangeMax;
|
int width, int height,
|
||||||
int m_gaugePos;
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -40,105 +40,104 @@ class wxArrayInt;
|
|||||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||||
|
|
||||||
// List box item
|
// List box item
|
||||||
class WXDLLEXPORT wxListBox: public wxControl
|
class WXDLLEXPORT wxListBox : public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||||
public:
|
|
||||||
|
|
||||||
wxListBox(void);
|
public:
|
||||||
inline wxListBox(wxWindow *parent, wxWindowID id,
|
wxListBox();
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
wxListBox(wxWindow *parent, wxWindowID id,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
long style = 0,
|
||||||
const wxString& name = wxListBoxNameStr)
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
{
|
const wxString& name = wxListBoxNameStr)
|
||||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
{
|
||||||
}
|
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||||
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxListBoxNameStr);
|
const wxString& name = wxListBoxNameStr);
|
||||||
|
|
||||||
~wxListBox();
|
~wxListBox();
|
||||||
|
|
||||||
bool MSWCommand(WXUINT param, WXWORD id);
|
bool MSWCommand(WXUINT param, WXWORD id);
|
||||||
|
|
||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN
|
||||||
bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
|
bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
|
||||||
bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||||
|
|
||||||
// plug-in for derived classes
|
// plug-in for derived classes
|
||||||
virtual wxOwnerDrawn *CreateItem(size_t n);
|
virtual wxOwnerDrawn *CreateItem(size_t n);
|
||||||
|
|
||||||
// allows to get the item and use SetXXX functions to set it's appearance
|
// allows to get the item and use SetXXX functions to set it's appearance
|
||||||
wxOwnerDrawn *GetItem(size_t n) const { return m_aItems[n]; }
|
wxOwnerDrawn *GetItem(size_t n) const { return m_aItems[n]; }
|
||||||
#endif
|
#endif // wxUSE_OWNER_DRAWN
|
||||||
|
|
||||||
virtual void Append(const wxString& item);
|
virtual void Append(const wxString& item);
|
||||||
virtual void Append(const wxString& item, char *clientData);
|
virtual void Append(const wxString& item, char *clientData);
|
||||||
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
|
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
|
||||||
virtual int FindString(const wxString& s) const ;
|
virtual int FindString(const wxString& s) const ;
|
||||||
virtual void Clear(void);
|
virtual void Clear();
|
||||||
virtual void SetSelection(int n, bool select = TRUE);
|
virtual void SetSelection(int n, bool select = TRUE);
|
||||||
|
|
||||||
virtual void Deselect(int n);
|
virtual void Deselect(int n);
|
||||||
|
|
||||||
// For single choice list item only
|
// For single choice list item only
|
||||||
virtual int GetSelection() const ;
|
virtual int GetSelection() const ;
|
||||||
virtual void Delete(int n);
|
virtual void Delete(int n);
|
||||||
virtual char *GetClientData(int n) const ;
|
virtual char *GetClientData(int n) const ;
|
||||||
virtual void SetClientData(int n, char *clientData);
|
virtual void SetClientData(int n, char *clientData);
|
||||||
virtual void SetString(int n, const wxString& s);
|
virtual void SetString(int n, const wxString& s);
|
||||||
|
|
||||||
// For single or multiple choice list item
|
// For single or multiple choice list item
|
||||||
virtual int GetSelections(wxArrayInt& aSelections) const;
|
virtual int GetSelections(wxArrayInt& aSelections) const;
|
||||||
virtual bool Selected(int n) const ;
|
virtual bool Selected(int n) const ;
|
||||||
virtual wxString GetString(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); }
|
|
||||||
|
|
||||||
// Set the specified item at the first visible item
|
// Set the specified item at the first visible item
|
||||||
// or scroll to max range.
|
// or scroll to max range.
|
||||||
virtual void SetFirstItem(int n) ;
|
virtual void SetFirstItem(int n) ;
|
||||||
virtual void SetFirstItem(const wxString& s) ;
|
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 wxString GetStringSelection() const ;
|
||||||
virtual bool SetStringSelection(const wxString& s, bool flag = TRUE);
|
virtual bool SetStringSelection(const wxString& s, bool flag = TRUE);
|
||||||
virtual int Number(void) const ;
|
virtual int Number() const ;
|
||||||
|
|
||||||
void Command(wxCommandEvent& event);
|
void Command(wxCommandEvent& event);
|
||||||
|
|
||||||
// Windows-specific code to set the horizontal extent of
|
// Windows-specific code to set the horizontal extent of
|
||||||
// the listbox, if necessary. If s is non-NULL, it's
|
// the listbox, if necessary. If s is non-NULL, it's
|
||||||
// used to calculate the horizontal extent.
|
// used to calculate the horizontal extent.
|
||||||
// Otherwise, all strings are used.
|
// Otherwise, all strings are used.
|
||||||
virtual void SetHorizontalExtent(const wxString& s = wxEmptyString);
|
virtual void SetHorizontalExtent(const wxString& s = wxEmptyString);
|
||||||
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
virtual void SetupColours(void);
|
virtual void SetupColours();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_noItems;
|
int m_noItems;
|
||||||
int m_selected;
|
int m_selected;
|
||||||
|
|
||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN
|
||||||
// control items
|
// control items
|
||||||
wxListBoxItemsArray m_aItems;
|
wxListBoxItemsArray m_aItems;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -84,8 +84,8 @@ typedef signed short int SHORT ;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_PENWIN
|
#if wxUSE_PENWIN
|
||||||
WXDLLEXPORT void wxRegisterPenWin(void);
|
WXDLLEXPORT void wxRegisterPenWin();
|
||||||
WXDLLEXPORT void wxCleanUpPenWin(void);
|
WXDLLEXPORT void wxCleanUpPenWin();
|
||||||
WXDLLEXPORT void wxEnablePenAppHooks (bool hook);
|
WXDLLEXPORT void wxEnablePenAppHooks (bool hook);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ VOID WINAPI ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) ;
|
|||||||
* - NULL any extra child window pointers not created for this item
|
* - NULL any extra child window pointers not created for this item
|
||||||
* (e.g. label control that wasn't needed)
|
* (e.g. label control that wasn't needed)
|
||||||
* - delete any extra child windows in the destructor (e.g. label control)
|
* - 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
|
* - to find panel position if coordinates are (-1, -1), use GetPosition
|
||||||
* - call AdvanceCursor after creation, for panel layout mechanism.
|
* - call AdvanceCursor after creation, for panel layout mechanism.
|
||||||
*
|
*
|
||||||
|
@@ -23,125 +23,120 @@ WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr;
|
|||||||
// List box item
|
// List box item
|
||||||
class WXDLLEXPORT wxBitmap ;
|
class WXDLLEXPORT wxBitmap ;
|
||||||
|
|
||||||
class WXDLLEXPORT wxRadioBox: public wxControl
|
class WXDLLEXPORT wxRadioBox : public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxRadioBox(void);
|
wxRadioBox();
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
#if WXWIN_COMPATIBILITY
|
||||||
wxRadioBox(wxWindow *parent, wxFunction func, const char *title,
|
wxRadioBox(wxWindow *parent, wxFunction func, const char *title,
|
||||||
int x = -1, int y = -1, int width = -1, int height = -1,
|
int x = -1, int y = -1, int width = -1, int height = -1,
|
||||||
int n = 0, char **choices = NULL,
|
int n = 0, char **choices = NULL,
|
||||||
int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr);
|
int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
inline wxRadioBox(wxWindow *parent, wxFunction func, const char *title,
|
inline wxRadioBox(wxWindow *parent, wxFunction func, const char *title,
|
||||||
int x, int y, int width, int height,
|
int x, int y, int width, int height,
|
||||||
int n, wxBitmap **choices,
|
int n, wxBitmap **choices,
|
||||||
int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr)
|
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,
|
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), n, (const wxBitmap **)choices, majorDim, style,
|
||||||
wxDefaultValidator, name);
|
wxDefaultValidator, name);
|
||||||
Callback(func);
|
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,
|
wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
int n = 0, const wxBitmap *choices[] = NULL,
|
||||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
|
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);
|
{
|
||||||
}
|
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
~wxRadioBox();
|
||||||
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(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,
|
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
int n = 0, const wxBitmap *choices[] = NULL,
|
||||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
|
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
||||||
|
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
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);
|
int FindString(const wxString& s) const;
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
void SetSelection(int N);
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
int GetSelection() const;
|
||||||
|
wxString GetString(int N) const;
|
||||||
|
|
||||||
int FindString(const wxString& s) const;
|
void GetSize(int *x, int *y) const;
|
||||||
void SetSelection(int N);
|
void GetPosition(int *x, int *y) const;
|
||||||
int GetSelection(void) const;
|
|
||||||
wxString GetString(int N) const;
|
|
||||||
|
|
||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
wxString GetLabel() const;
|
||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
void SetLabel(const wxString& label);
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
void SetLabel(int item, const wxString& label) ;
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
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;
|
virtual wxString GetStringSelection() const;
|
||||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
virtual bool SetStringSelection(const wxString& s);
|
||||||
|
virtual int Number() const { return m_noItems; } ;
|
||||||
|
void Command(wxCommandEvent& event);
|
||||||
|
|
||||||
void GetPosition(int *x, int *y) const;
|
int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
|
||||||
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
|
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
||||||
|
|
||||||
wxString GetLabel(void) const;
|
// Implementation
|
||||||
void SetLabel(const wxString& label);
|
WXHWND *GetRadioButtons() const { return m_radioButtons; }
|
||||||
void SetLabel(int item, const wxString& label) ;
|
bool ContainsHWND(WXHWND hWnd) const ;
|
||||||
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); }
|
|
||||||
|
|
||||||
virtual wxString GetStringSelection(void) const;
|
long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
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);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
WXHWND * m_radioButtons;
|
WXHWND * m_radioButtons;
|
||||||
int m_majorDim ;
|
int m_majorDim ;
|
||||||
int * m_radioWidth ; // for bitmaps
|
int * m_radioWidth ; // for bitmaps
|
||||||
int * m_radioHeight ;
|
int * m_radioHeight ;
|
||||||
|
|
||||||
int m_noItems;
|
int m_noItems;
|
||||||
int m_noRowsOrCols;
|
int m_noRowsOrCols;
|
||||||
int m_selectedButton;
|
int m_selectedButton;
|
||||||
|
|
||||||
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -21,92 +21,88 @@
|
|||||||
WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
|
||||||
|
|
||||||
// Slider
|
// Slider
|
||||||
class WXDLLEXPORT wxSlider95: public wxControl
|
class WXDLLEXPORT wxSlider95 : public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxSlider95)
|
DECLARE_DYNAMIC_CLASS(wxSlider95)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxSlider95(void);
|
wxSlider95();
|
||||||
|
|
||||||
inline wxSlider95(wxWindow *parent, wxWindowID id,
|
wxSlider95(wxWindow *parent, wxWindowID id,
|
||||||
int value, int minValue, int maxValue,
|
int value, int minValue, int maxValue,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxSL_HORIZONTAL,
|
long style = wxSL_HORIZONTAL,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxSliderNameStr)
|
const wxString& name = wxSliderNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
~wxSlider95(void);
|
~wxSlider95();
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
int value, int minValue, int maxValue,
|
int value, int minValue, int maxValue,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxSL_HORIZONTAL,
|
long style = wxSL_HORIZONTAL,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxSliderNameStr);
|
const wxString& name = wxSliderNameStr);
|
||||||
|
|
||||||
virtual int GetValue(void) const ;
|
virtual int GetValue() const ;
|
||||||
virtual void SetValue(int);
|
virtual void SetValue(int);
|
||||||
|
|
||||||
void GetSize(int *x, int *y) const ;
|
void GetSize(int *x, int *y) const ;
|
||||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
void GetPosition(int *x, int *y) const ;
|
||||||
|
|
||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
bool Show(bool show);
|
||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
|
||||||
|
|
||||||
void GetPosition(int *x, int *y) const ;
|
void SetRange(int minValue, int maxValue);
|
||||||
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
|
|
||||||
|
|
||||||
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; }
|
// IMPLEMENTATION
|
||||||
inline int GetMax(void) const { return m_rangeMax; }
|
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 Command(wxCommandEvent& event);
|
||||||
void SetTickFreq(int n, int pos);
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
inline int GetTickFreq(void) const { return m_tickFreq; }
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
void SetPageSize(int pageSize);
|
void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control);
|
||||||
int GetPageSize(void) const ;
|
void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control);
|
||||||
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) ;
|
|
||||||
|
|
||||||
// IMPLEMENTATION
|
protected:
|
||||||
inline WXHWND GetStaticMin() const { return m_staticMin; }
|
WXHWND m_staticMin;
|
||||||
inline WXHWND GetStaticMax() const { return m_staticMax; }
|
WXHWND m_staticMax;
|
||||||
inline WXHWND GetEditValue() const { return m_staticValue; }
|
WXHWND m_staticValue;
|
||||||
virtual bool ContainsHWND(WXHWND hWnd) const;
|
int m_rangeMin;
|
||||||
|
int m_rangeMax;
|
||||||
|
int m_pageSize;
|
||||||
|
int m_lineSize;
|
||||||
|
int m_tickFreq;
|
||||||
|
|
||||||
void Command(wxCommandEvent& event);
|
virtual void DoSetSize(int x, int y,
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
int width, int height,
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -21,92 +21,88 @@
|
|||||||
WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
|
||||||
|
|
||||||
// Slider
|
// Slider
|
||||||
class WXDLLEXPORT wxSliderMSW: public wxControl
|
class WXDLLEXPORT wxSliderMSW : public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxSliderMSW)
|
DECLARE_DYNAMIC_CLASS(wxSliderMSW)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxSliderMSW(void);
|
wxSliderMSW();
|
||||||
|
|
||||||
inline wxSliderMSW(wxWindow *parent, wxWindowID id,
|
wxSliderMSW(wxWindow *parent, wxWindowID id,
|
||||||
int value, int minValue, int maxValue,
|
int value, int minValue, int maxValue,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxSL_HORIZONTAL,
|
long style = wxSL_HORIZONTAL,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxSliderNameStr)
|
const wxString& name = wxSliderNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
~wxSliderMSW(void);
|
~wxSliderMSW();
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
int value, int minValue, int maxValue,
|
int value, int minValue, int maxValue,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxSL_HORIZONTAL,
|
long style = wxSL_HORIZONTAL,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxSliderNameStr);
|
const wxString& name = wxSliderNameStr);
|
||||||
|
|
||||||
virtual int GetValue(void) const ;
|
virtual int GetValue() const ;
|
||||||
virtual void SetValue(int);
|
virtual void SetValue(int);
|
||||||
|
|
||||||
void GetSize(int *x, int *y) const ;
|
void GetSize(int *x, int *y) const ;
|
||||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
void GetPosition(int *x, int *y) const ;
|
||||||
|
|
||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
bool Show(bool show);
|
||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
|
||||||
|
|
||||||
void GetPosition(int *x, int *y) const ;
|
void SetRange(int minValue, int maxValue);
|
||||||
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
|
|
||||||
|
|
||||||
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; }
|
// IMPLEMENTATION
|
||||||
inline int GetMax(void) const { return m_rangeMax; }
|
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 Command(wxCommandEvent& event);
|
||||||
void SetTickFreq(int n, int pos);
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
inline int GetTickFreq(void) const { return m_tickFreq; }
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
void SetPageSize(int pageSize);
|
void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control);
|
||||||
int GetPageSize(void) const ;
|
void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control);
|
||||||
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) ;
|
|
||||||
|
|
||||||
// IMPLEMENTATION
|
protected:
|
||||||
inline WXHWND GetStaticMin() const { return m_staticMin; }
|
WXHWND m_staticMin;
|
||||||
inline WXHWND GetStaticMax() const { return m_staticMax; }
|
WXHWND m_staticMax;
|
||||||
inline WXHWND GetEditValue() const { return m_staticValue; }
|
WXHWND m_staticValue;
|
||||||
virtual bool ContainsHWND(WXHWND hWnd) const;
|
int m_rangeMin;
|
||||||
|
int m_rangeMax;
|
||||||
|
int m_pageSize;
|
||||||
|
int m_lineSize;
|
||||||
|
int m_tickFreq;
|
||||||
|
|
||||||
void Command(wxCommandEvent& event);
|
virtual void DoSetSize(int x, int y,
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
int width, int height,
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -22,7 +22,7 @@ WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
|
|||||||
|
|
||||||
class WXDLLEXPORT wxStaticBitmap : public wxControl
|
class WXDLLEXPORT wxStaticBitmap : public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxStaticBitmap() { }
|
wxStaticBitmap() { }
|
||||||
@@ -49,12 +49,6 @@ public:
|
|||||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) { }
|
virtual void Command(wxCommandEvent& WXUNUSED(event)) { }
|
||||||
virtual void ProcessCommand(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; }
|
wxBitmap& GetBitmap(void) const { return (wxBitmap&) m_messageBitmap; }
|
||||||
|
|
||||||
// overriden base class virtuals
|
// overriden base class virtuals
|
||||||
@@ -67,6 +61,9 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
wxBitmap m_messageBitmap;
|
wxBitmap m_messageBitmap;
|
||||||
|
|
||||||
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -26,7 +26,7 @@ class WXDLLEXPORT wxStaticBox : public wxControl
|
|||||||
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxStaticBox() {}
|
wxStaticBox() { }
|
||||||
|
|
||||||
wxStaticBox(wxWindow *parent, wxWindowID id,
|
wxStaticBox(wxWindow *parent, wxWindowID id,
|
||||||
const wxString& label,
|
const wxString& label,
|
||||||
@@ -52,11 +52,6 @@ public:
|
|||||||
|
|
||||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
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);
|
void SetLabel(const wxString& label);
|
||||||
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
@@ -65,6 +60,11 @@ public:
|
|||||||
// overriden base class virtuals
|
// overriden base class virtuals
|
||||||
virtual bool AcceptsFocus() const { return FALSE; }
|
virtual bool AcceptsFocus() const { return FALSE; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
@@ -45,11 +45,6 @@ public:
|
|||||||
const wxString& name = wxStaticTextNameStr);
|
const wxString& name = wxStaticTextNameStr);
|
||||||
|
|
||||||
// accessors
|
// 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);
|
void SetLabel(const wxString& label);
|
||||||
|
|
||||||
// operations
|
// operations
|
||||||
@@ -63,6 +58,11 @@ public:
|
|||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
virtual long MSWWindowProc(WXUINT nMsg, 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
|
#endif
|
||||||
|
@@ -35,7 +35,7 @@ WXDLLEXPORT_DATA(extern const char*) wxTextCtrlNameStr;
|
|||||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||||
|
|
||||||
// Single-line text item
|
// 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:
|
// 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. !!
|
// 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)
|
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// creation
|
// creation
|
||||||
// --------
|
// --------
|
||||||
wxTextCtrl();
|
wxTextCtrl();
|
||||||
inline wxTextCtrl(wxWindow *parent, wxWindowID id,
|
wxTextCtrl(wxWindow *parent, wxWindowID id,
|
||||||
const wxString& value = wxEmptyString,
|
const wxString& value = wxEmptyString,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = 0,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxTextCtrlNameStr)
|
const wxString& name = wxTextCtrlNameStr)
|
||||||
#ifndef NO_TEXT_WINDOW_STREAM
|
#ifndef NO_TEXT_WINDOW_STREAM
|
||||||
:streambuf()
|
:streambuf()
|
||||||
#endif
|
#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,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxString& value = wxEmptyString,
|
const wxString& value = wxEmptyString,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = wxTE_PROCESS_TAB,
|
const wxSize& size = wxDefaultSize, long style = wxTE_PROCESS_TAB,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxTextCtrlNameStr);
|
const wxString& name = wxTextCtrlNameStr);
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
// ---------
|
// ---------
|
||||||
virtual wxString GetValue() const ;
|
virtual wxString GetValue() const ;
|
||||||
virtual void SetValue(const wxString& value);
|
virtual void SetValue(const wxString& value);
|
||||||
|
|
||||||
virtual int GetLineLength(long lineNo) const;
|
virtual int GetLineLength(long lineNo) const;
|
||||||
virtual wxString GetLineText(long lineNo) const;
|
virtual wxString GetLineText(long lineNo) const;
|
||||||
virtual int GetNumberOfLines() const;
|
virtual int GetNumberOfLines() const;
|
||||||
|
|
||||||
// operations
|
// 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); }
|
|
||||||
|
|
||||||
// Clipboard operations
|
// Clipboard operations
|
||||||
virtual void Copy();
|
virtual void Copy();
|
||||||
virtual void Cut();
|
virtual void Cut();
|
||||||
virtual void Paste();
|
virtual void Paste();
|
||||||
|
|
||||||
virtual void SetInsertionPoint(long pos);
|
virtual void SetInsertionPoint(long pos);
|
||||||
virtual void SetInsertionPointEnd();
|
virtual void SetInsertionPointEnd();
|
||||||
virtual long GetInsertionPoint() const ;
|
virtual long GetInsertionPoint() const ;
|
||||||
virtual long GetLastPosition() const ;
|
virtual long GetLastPosition() const ;
|
||||||
virtual void Replace(long from, long to, const wxString& value);
|
virtual void Replace(long from, long to, const wxString& value);
|
||||||
virtual void Remove(long from, long to);
|
virtual void Remove(long from, long to);
|
||||||
virtual void SetSelection(long from, long to);
|
virtual void SetSelection(long from, long to);
|
||||||
virtual void SetEditable(bool editable);
|
virtual void SetEditable(bool editable);
|
||||||
|
|
||||||
// streambuf implementation
|
// streambuf implementation
|
||||||
#ifndef NO_TEXT_WINDOW_STREAM
|
#ifndef NO_TEXT_WINDOW_STREAM
|
||||||
int overflow(int i);
|
int overflow(int i);
|
||||||
int sync();
|
int sync();
|
||||||
int underflow();
|
int underflow();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxTextCtrl& operator<<(const wxString& s);
|
wxTextCtrl& operator<<(const wxString& s);
|
||||||
wxTextCtrl& operator<<(int i);
|
wxTextCtrl& operator<<(int i);
|
||||||
wxTextCtrl& operator<<(long i);
|
wxTextCtrl& operator<<(long i);
|
||||||
wxTextCtrl& operator<<(float f);
|
wxTextCtrl& operator<<(float f);
|
||||||
wxTextCtrl& operator<<(double d);
|
wxTextCtrl& operator<<(double d);
|
||||||
wxTextCtrl& operator<<(const char c);
|
wxTextCtrl& operator<<(const char c);
|
||||||
|
|
||||||
virtual bool LoadFile(const wxString& file);
|
virtual bool LoadFile(const wxString& file);
|
||||||
virtual bool SaveFile(const wxString& file);
|
virtual bool SaveFile(const wxString& file);
|
||||||
virtual void WriteText(const wxString& text);
|
virtual void WriteText(const wxString& text);
|
||||||
virtual void AppendText(const wxString& text);
|
virtual void AppendText(const wxString& text);
|
||||||
virtual void DiscardEdits();
|
virtual void DiscardEdits();
|
||||||
virtual bool IsModified() const;
|
virtual bool IsModified() const;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
#if WXWIN_COMPATIBILITY
|
||||||
inline bool Modified() const { return IsModified(); }
|
inline bool Modified() const { return IsModified(); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual long XYToPosition(long x, long y) const ;
|
virtual long XYToPosition(long x, long y) const ;
|
||||||
virtual void PositionToXY(long pos, long *x, long *y) const ;
|
virtual void PositionToXY(long pos, long *x, long *y) const ;
|
||||||
virtual void ShowPosition(long pos);
|
virtual void ShowPosition(long pos);
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
// ---------
|
// ---------
|
||||||
void OnDropFiles(wxDropFilesEvent& event);
|
void OnDropFiles(wxDropFilesEvent& event);
|
||||||
void OnChar(wxKeyEvent& event); // Process 'enter' if required
|
void OnChar(wxKeyEvent& event); // Process 'enter' if required
|
||||||
void OnEraseBackground(wxEraseEvent& event);
|
void OnEraseBackground(wxEraseEvent& event);
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
// --------------
|
// --------------
|
||||||
virtual void Command(wxCommandEvent& event);
|
virtual void Command(wxCommandEvent& event);
|
||||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||||
|
|
||||||
#if wxUSE_RICHEDIT
|
#if wxUSE_RICHEDIT
|
||||||
bool IsRich() const { return m_isRich; }
|
bool IsRich() const { return m_isRich; }
|
||||||
void SetRichEdit(bool isRich) { m_isRich = isRich; }
|
void SetRichEdit(bool isRich) { m_isRich = isRich; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
WXUINT message, WXWPARAM wParam,
|
WXUINT message, WXWPARAM wParam,
|
||||||
WXLPARAM lParam);
|
WXLPARAM lParam);
|
||||||
|
|
||||||
virtual void AdoptAttributesFromHWND();
|
virtual void AdoptAttributesFromHWND();
|
||||||
virtual void SetupColours();
|
virtual void SetupColours();
|
||||||
virtual long MSWGetDlgCode();
|
virtual long MSWGetDlgCode();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#if wxUSE_RICHEDIT
|
#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
|
#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
|
#endif
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -328,7 +328,6 @@ bool wxFTP::Abort(void)
|
|||||||
wxInputStream *wxFTP::GetInputStream(const wxString& path)
|
wxInputStream *wxFTP::GetInputStream(const wxString& path)
|
||||||
{
|
{
|
||||||
wxString tmp_str;
|
wxString tmp_str;
|
||||||
size_t calc_size;
|
|
||||||
|
|
||||||
if (!SendCommand("TYPE I", '2'))
|
if (!SendCommand("TYPE I", '2'))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -1273,7 +1273,7 @@ void wxSizer::RemoveSizerChild(wxWindow *child)
|
|||||||
GetChildren().DeleteObject(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();
|
wxLayoutConstraints *constr = GetConstraints();
|
||||||
if (x != -1)
|
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)
|
bool wxRowColSizer::LayoutPhase1(int *noChanges)
|
||||||
{
|
{
|
||||||
*noChanges = 0;
|
*noChanges = 0;
|
||||||
|
@@ -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
|
// make life easier for people using VC++ IDE: clicking on the message will
|
||||||
// take us immediately to the place of the failed assert
|
// take us immediately to the place of the failed assert
|
||||||
#ifdef __VISUALC__
|
#ifdef __VISUALC__
|
||||||
sprintf(szBuf, _("%s(%d): assert failed"), szFile, nLine);
|
sprintf(szBuf, "%s(%d): assert failed", szFile, nLine);
|
||||||
#else // !VC++
|
#else // !VC++
|
||||||
// make the error message more clear for all the others
|
// 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
|
#endif // VC/!VC
|
||||||
|
|
||||||
if ( szMsg != NULL ) {
|
if ( szMsg != NULL ) {
|
||||||
@@ -1015,9 +1015,9 @@ void wxOnAssert(const char *szFile, int nLine, const char *szMsg)
|
|||||||
#if wxUSE_NOGUI
|
#if wxUSE_NOGUI
|
||||||
Trap();
|
Trap();
|
||||||
#else
|
#else
|
||||||
strcat(szBuf, _("\nDo you want to stop the program?"
|
strcat(szBuf, "\nDo you want to stop the program?"
|
||||||
"\nYou can also choose [Cancel] to suppress "
|
"\nYou can also choose [Cancel] to suppress "
|
||||||
"further warnings."));
|
"further warnings.");
|
||||||
|
|
||||||
switch ( wxMessageBox(szBuf, _("Debug"),
|
switch ( wxMessageBox(szBuf, _("Debug"),
|
||||||
wxYES_NO | wxCANCEL | wxICON_STOP ) ) {
|
wxYES_NO | wxCANCEL | wxICON_STOP ) ) {
|
||||||
|
@@ -320,7 +320,7 @@ void wxObject::LoadObject( wxObjectInputStream& stream )
|
|||||||
m_serialObj->LoadObject(stream);
|
m_serialObj->LoadObject(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // wxUSE_SERIAL
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxObject: cloning of objects
|
* wxObject: cloning of objects
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#include "wx/wx.h"
|
#include "wx/wx.h"
|
||||||
|
#include "wx/dynarray.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __WIN16__
|
#ifndef __WIN16__
|
||||||
|
@@ -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_widget != NULL), "invalid dialog" );
|
||||||
wxASSERT_MSG( (m_wxwindow != 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;
|
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 )
|
void wxDialog::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
|
||||||
{
|
{
|
||||||
// due to a bug in gtk, x,y are always 0
|
// due to a bug in gtk, x,y are always 0
|
||||||
|
@@ -46,11 +46,11 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
|
|||||||
{
|
{
|
||||||
int style = dialog->GetStyle();
|
int style = dialog->GetStyle();
|
||||||
|
|
||||||
if ((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT))
|
GtkFileSelection *filedlg = GTK_FILE_SELECTION(dialog->m_widget);
|
||||||
{
|
char *filename = gtk_file_selection_get_filename(filedlg);
|
||||||
char *filename = gtk_file_selection_get_filename(
|
|
||||||
GTK_FILE_SELECTION(dialog->m_widget) );
|
|
||||||
|
|
||||||
|
if ( (style & wxSAVE) && ( style & wxOVERWRITE_PROMPT ) )
|
||||||
|
{
|
||||||
if (wxFileExists( filename ))
|
if (wxFileExists( filename ))
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
@@ -61,10 +61,19 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
|
|||||||
return;
|
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 );
|
event.SetEventObject( dialog );
|
||||||
dialog->GetEventHandler()->ProcessEvent( event );
|
dialog->GetEventHandler()->ProcessEvent( event );
|
||||||
}
|
}
|
||||||
@@ -76,7 +85,7 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
|
|||||||
static
|
static
|
||||||
void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(w), wxFileDialog *dialog )
|
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 );
|
event.SetEventObject( dialog );
|
||||||
dialog->GetEventHandler()->ProcessEvent( event );
|
dialog->GetEventHandler()->ProcessEvent( event );
|
||||||
}
|
}
|
||||||
|
@@ -249,7 +249,7 @@ wxPoint wxFrame::GetClientAreaOrigin() const
|
|||||||
return pt;
|
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" );
|
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;
|
m_resizing = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::SetSize( int width, int height )
|
|
||||||
{
|
|
||||||
SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING );
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxFrame::Centre( int direction )
|
void wxFrame::Centre( int direction )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );
|
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" );
|
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation "window.h"
|
#pragma implementation "window.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
@@ -21,12 +21,15 @@
|
|||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/dialog.h"
|
#include "wx/dialog.h"
|
||||||
#include "wx/msgdlg.h"
|
#include "wx/msgdlg.h"
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
#include "wx/dnd.h"
|
#include "wx/dnd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
#include "wx/tooltip.h"
|
#include "wx/tooltip.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/statusbr.h"
|
#include "wx/statusbr.h"
|
||||||
#include "wx/intl.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_widget != NULL), "invalid window" );
|
||||||
wxASSERT_MSG( (m_parent != NULL), "wxWindow::SetSize requires parent.\n" );
|
wxASSERT_MSG( (m_parent != NULL), "wxWindow::SetSize requires parent.\n" );
|
||||||
@@ -1883,16 +1886,6 @@ void wxWindow::OnInternalIdle()
|
|||||||
UpdateWindowUI();
|
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
|
void wxWindow::GetSize( int *width, int *height ) const
|
||||||
{
|
{
|
||||||
wxCHECK_RET( (m_widget != NULL), "invalid window" );
|
wxCHECK_RET( (m_widget != NULL), "invalid window" );
|
||||||
@@ -1901,7 +1894,7 @@ void wxWindow::GetSize( int *width, int *height ) const
|
|||||||
if (height) (*height) = m_height;
|
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" );
|
wxCHECK_RET( (m_widget != NULL), "invalid window" );
|
||||||
|
|
||||||
|
@@ -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_widget != NULL), "invalid dialog" );
|
||||||
wxASSERT_MSG( (m_wxwindow != 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;
|
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 )
|
void wxDialog::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
|
||||||
{
|
{
|
||||||
// due to a bug in gtk, x,y are always 0
|
// due to a bug in gtk, x,y are always 0
|
||||||
|
@@ -46,11 +46,11 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
|
|||||||
{
|
{
|
||||||
int style = dialog->GetStyle();
|
int style = dialog->GetStyle();
|
||||||
|
|
||||||
if ((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT))
|
GtkFileSelection *filedlg = GTK_FILE_SELECTION(dialog->m_widget);
|
||||||
{
|
char *filename = gtk_file_selection_get_filename(filedlg);
|
||||||
char *filename = gtk_file_selection_get_filename(
|
|
||||||
GTK_FILE_SELECTION(dialog->m_widget) );
|
|
||||||
|
|
||||||
|
if ( (style & wxSAVE) && ( style & wxOVERWRITE_PROMPT ) )
|
||||||
|
{
|
||||||
if (wxFileExists( filename ))
|
if (wxFileExists( filename ))
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
@@ -61,10 +61,19 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
|
|||||||
return;
|
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 );
|
event.SetEventObject( dialog );
|
||||||
dialog->GetEventHandler()->ProcessEvent( event );
|
dialog->GetEventHandler()->ProcessEvent( event );
|
||||||
}
|
}
|
||||||
@@ -76,7 +85,7 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
|
|||||||
static
|
static
|
||||||
void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(w), wxFileDialog *dialog )
|
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 );
|
event.SetEventObject( dialog );
|
||||||
dialog->GetEventHandler()->ProcessEvent( event );
|
dialog->GetEventHandler()->ProcessEvent( event );
|
||||||
}
|
}
|
||||||
|
@@ -249,7 +249,7 @@ wxPoint wxFrame::GetClientAreaOrigin() const
|
|||||||
return pt;
|
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" );
|
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;
|
m_resizing = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::SetSize( int width, int height )
|
|
||||||
{
|
|
||||||
SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING );
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxFrame::Centre( int direction )
|
void wxFrame::Centre( int direction )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );
|
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" );
|
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation "window.h"
|
#pragma implementation "window.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
@@ -21,12 +21,15 @@
|
|||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/dialog.h"
|
#include "wx/dialog.h"
|
||||||
#include "wx/msgdlg.h"
|
#include "wx/msgdlg.h"
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
#include "wx/dnd.h"
|
#include "wx/dnd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
#include "wx/tooltip.h"
|
#include "wx/tooltip.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/statusbr.h"
|
#include "wx/statusbr.h"
|
||||||
#include "wx/intl.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_widget != NULL), "invalid window" );
|
||||||
wxASSERT_MSG( (m_parent != NULL), "wxWindow::SetSize requires parent.\n" );
|
wxASSERT_MSG( (m_parent != NULL), "wxWindow::SetSize requires parent.\n" );
|
||||||
@@ -1883,16 +1886,6 @@ void wxWindow::OnInternalIdle()
|
|||||||
UpdateWindowUI();
|
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
|
void wxWindow::GetSize( int *width, int *height ) const
|
||||||
{
|
{
|
||||||
wxCHECK_RET( (m_widget != NULL), "invalid window" );
|
wxCHECK_RET( (m_widget != NULL), "invalid window" );
|
||||||
@@ -1901,7 +1894,7 @@ void wxWindow::GetSize( int *width, int *height ) const
|
|||||||
if (height) (*height) = m_height;
|
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" );
|
wxCHECK_RET( (m_widget != NULL), "invalid window" );
|
||||||
|
|
||||||
|
@@ -123,7 +123,7 @@ void wxBitmapCheckBox::SetLabel(const wxBitmap& bitmap)
|
|||||||
// TODO
|
// 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
|
// TODO
|
||||||
}
|
}
|
||||||
|
@@ -349,7 +349,7 @@ void wxChoice::SetFocus()
|
|||||||
XmProcessTraversal(XtParent((Widget)m_mainWidget), XmTRAVERSE_CURRENT);
|
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);
|
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_ANY, NULL);
|
||||||
bool managed = XtIsManaged((Widget) m_formWidget);
|
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);
|
XtManageChild ((Widget) m_formWidget);
|
||||||
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
|
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
|
wxString wxChoice::GetStringSelection () const
|
||||||
|
@@ -102,10 +102,10 @@ wxComboBox::~wxComboBox()
|
|||||||
m_mainWidget = (WXWidget) 0;
|
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
|
// 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
|
wxString wxComboBox::GetValue() const
|
||||||
|
@@ -335,19 +335,13 @@ XtVaGetValues((Widget) m_mainWidget, XmNiconic, &iconic, NULL);
|
|||||||
return FALSE;
|
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);
|
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);
|
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)
|
void wxDialog::SetTitle(const wxString& title)
|
||||||
{
|
{
|
||||||
m_dialogTitle = title;
|
m_dialogTitle = title;
|
||||||
|
@@ -412,7 +412,7 @@ void wxFrame::GetClientSize(int *x, int *y) const
|
|||||||
|
|
||||||
// Set the client size (i.e. leave the calculation of borders etc.
|
// Set the client size (i.e. leave the calculation of borders etc.
|
||||||
// to wxWindows)
|
// 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
|
// Calculate how large the new main window should be
|
||||||
// by finding the difference between the client area and the
|
// 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;
|
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)
|
if (x > -1)
|
||||||
XtVaSetValues((Widget) m_frameShell, XmNx, x, NULL);
|
XtVaSetValues((Widget) m_frameShell, XmNx, x, NULL);
|
||||||
|
@@ -134,11 +134,6 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
|
|||||||
return TRUE;
|
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)
|
void wxGauge::SetShadowWidth(int w)
|
||||||
{
|
{
|
||||||
if (w == 0)
|
if (w == 0)
|
||||||
|
@@ -512,9 +512,9 @@ wxString wxListBox::GetString(int N) const
|
|||||||
return wxEmptyString;
|
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
|
// Check resulting size is correct
|
||||||
int tempW, tempH;
|
int tempW, tempH;
|
||||||
|
@@ -109,12 +109,6 @@ wxMDIParentFrame::~wxMDIParentFrame()
|
|||||||
m_clientWindow = NULL;
|
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)
|
void wxMDIParentFrame::SetMenuBar(wxMenuBar *menu_bar)
|
||||||
{
|
{
|
||||||
m_frameMenuBar = menu_bar;
|
m_frameMenuBar = menu_bar;
|
||||||
@@ -438,7 +432,7 @@ void wxMDIChildFrame::OnLower()
|
|||||||
// to wxWindows)
|
// to wxWindows)
|
||||||
void wxMDIChildFrame::SetClientSize(int width, int height)
|
void wxMDIChildFrame::SetClientSize(int width, int height)
|
||||||
{
|
{
|
||||||
wxWindow::SetClientSize(width, height);
|
wxWindow::DoSetClientSize(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMDIChildFrame::GetClientSize(int* width, int* height) const
|
void wxMDIChildFrame::GetClientSize(int* width, int* height) const
|
||||||
@@ -446,9 +440,9 @@ void wxMDIChildFrame::GetClientSize(int* width, int* height) const
|
|||||||
wxWindow::GetSize(width, height);
|
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
|
void wxMDIChildFrame::GetSize(int* width, int* height) const
|
||||||
@@ -590,14 +584,14 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
|
|||||||
return FALSE;
|
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
|
void wxMDIClientWindow::GetClientSize(int *width, int *height) const
|
||||||
|
@@ -297,7 +297,7 @@ wxString wxRadioBox::GetString(int n) const
|
|||||||
return m_radioButtonLabels[n];
|
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);
|
bool managed = XtIsManaged((Widget) m_formWidget);
|
||||||
|
|
||||||
|
@@ -131,7 +131,7 @@ void wxSlider::GetSize(int *width, int *height) const
|
|||||||
wxControl::GetSize(width, height);
|
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;
|
Widget widget = (Widget) m_mainWidget;
|
||||||
|
|
||||||
|
@@ -82,11 +82,6 @@ wxStaticBitmap::~wxStaticBitmap()
|
|||||||
SetBitmap(wxNullBitmap);
|
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)
|
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
|
||||||
{
|
{
|
||||||
m_messageBitmap = bitmap;
|
m_messageBitmap = bitmap;
|
||||||
|
@@ -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)
|
if (m_labelWidget)
|
||||||
{
|
{
|
||||||
|
@@ -96,7 +96,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
return TRUE;
|
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;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
|
@@ -118,7 +118,7 @@ void wxCheckBox::SetLabel(const wxString& label)
|
|||||||
SetWindowText((HWND)GetHWND(), 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;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
@@ -174,7 +174,7 @@ void wxCheckBox::SetValue(bool val)
|
|||||||
#define BST_CHECKED 0x0001
|
#define BST_CHECKED 0x0001
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxCheckBox::GetValue(void) const
|
bool wxCheckBox::GetValue() const
|
||||||
{
|
{
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
return (SendMessage((HWND) GetHWND(), BM_GETCHECK, 0, 0) == BST_CHECKED);
|
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;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
@@ -307,7 +307,7 @@ void wxBitmapCheckBox::SetValue(bool val)
|
|||||||
SendMessage((HWND) GetHWND(), BM_SETCHECK, val, 0);
|
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);
|
return ((0x003 & SendMessage((HWND) GetHWND(), BM_GETCHECK, 0, 0)) == 0x003);
|
||||||
}
|
}
|
||||||
|
@@ -180,7 +180,7 @@ wxString wxChoice::GetString(int n) const
|
|||||||
return wxString(wxBuffer);
|
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;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
|
@@ -68,7 +68,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
|
|||||||
bool wxFrame::m_useNativeStatusBar = FALSE;
|
bool wxFrame::m_useNativeStatusBar = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxFrame::wxFrame(void)
|
wxFrame::wxFrame()
|
||||||
{
|
{
|
||||||
m_frameToolBar = NULL ;
|
m_frameToolBar = NULL ;
|
||||||
m_frameMenuBar = NULL;
|
m_frameMenuBar = NULL;
|
||||||
@@ -126,7 +126,7 @@ bool wxFrame::Create(wxWindow *parent,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFrame::~wxFrame(void)
|
wxFrame::~wxFrame()
|
||||||
{
|
{
|
||||||
m_isBeingDeleted = TRUE;
|
m_isBeingDeleted = TRUE;
|
||||||
wxTopLevelWindows.DeleteObject(this);
|
wxTopLevelWindows.DeleteObject(this);
|
||||||
@@ -158,7 +158,7 @@ wxFrame::~wxFrame(void)
|
|||||||
::BringWindowToTop((HWND) GetParent()->GetHWND());
|
::BringWindowToTop((HWND) GetParent()->GetHWND());
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHMENU wxFrame::GetWinMenu(void) const
|
WXHMENU wxFrame::GetWinMenu() const
|
||||||
{
|
{
|
||||||
return m_hMenu;
|
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.
|
// Set the client size (i.e. leave the calculation of borders etc.
|
||||||
// to wxWindows)
|
// to wxWindows)
|
||||||
void wxFrame::SetClientSize(int width, int height)
|
void wxFrame::DoSetClientSize(int width, int height)
|
||||||
{
|
{
|
||||||
HWND hWnd = (HWND) GetHWND();
|
HWND hWnd = (HWND) GetHWND();
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ void wxFrame::GetPosition(int *x, int *y) const
|
|||||||
*y = point.y;
|
*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 currentX, currentY;
|
||||||
int x1 = x;
|
int x1 = x;
|
||||||
@@ -329,14 +329,14 @@ void wxFrame::Maximize(bool maximize)
|
|||||||
m_iconized = FALSE;
|
m_iconized = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::IsIconized(void) const
|
bool wxFrame::IsIconized() const
|
||||||
{
|
{
|
||||||
((wxFrame *)this)->m_iconized = (::IsIconic((HWND) GetHWND()) != 0);
|
((wxFrame *)this)->m_iconized = (::IsIconic((HWND) GetHWND()) != 0);
|
||||||
return m_iconized;
|
return m_iconized;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is it maximized?
|
// Is it maximized?
|
||||||
bool wxFrame::IsMaximized(void) const
|
bool wxFrame::IsMaximized() const
|
||||||
{
|
{
|
||||||
return (::IsZoomed((HWND) GetHWND()) != 0) ;
|
return (::IsZoomed((HWND) GetHWND()) != 0) ;
|
||||||
}
|
}
|
||||||
@@ -346,7 +346,7 @@ void wxFrame::SetTitle(const wxString& title)
|
|||||||
SetWindowText((HWND) GetHWND(), (const char *)title);
|
SetWindowText((HWND) GetHWND(), (const char *)title);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxFrame::GetTitle(void) const
|
wxString wxFrame::GetTitle() const
|
||||||
{
|
{
|
||||||
GetWindowText((HWND) GetHWND(), wxBuffer, 1000);
|
GetWindowText((HWND) GetHWND(), wxBuffer, 1000);
|
||||||
return wxString(wxBuffer);
|
return wxString(wxBuffer);
|
||||||
@@ -427,7 +427,7 @@ void wxFrame::SetStatusWidths(int n, const int widths_field[])
|
|||||||
PositionStatusBar();
|
PositionStatusBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::PositionStatusBar(void)
|
void wxFrame::PositionStatusBar()
|
||||||
{
|
{
|
||||||
// native status bar positions itself
|
// native status bar positions itself
|
||||||
if (m_frameStatusBar
|
if (m_frameStatusBar
|
||||||
@@ -515,7 +515,7 @@ bool wxFrame::LoadAccelerators(const wxString& table)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void wxFrame::Fit(void)
|
void wxFrame::Fit()
|
||||||
{
|
{
|
||||||
// Work out max. size
|
// Work out max. size
|
||||||
wxNode *node = GetChildren().First();
|
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));
|
::PostMessage((HWND) GetHWND(), WM_SIZE, SIZE_RESTORED, MAKELPARAM(width, height));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::MSWOnPaint(void)
|
bool wxFrame::MSWOnPaint()
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT rect;
|
||||||
if (GetUpdateRect((HWND) GetHWND(), &rect, FALSE))
|
if (GetUpdateRect((HWND) GetHWND(), &rect, FALSE))
|
||||||
@@ -679,7 +679,7 @@ bool wxFrame::MSWOnPaint(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHICON wxFrame::MSWOnQueryDragIcon(void)
|
WXHICON wxFrame::MSWOnQueryDragIcon()
|
||||||
{
|
{
|
||||||
if (m_icon.Ok() && (m_icon.GetHICON() != 0))
|
if (m_icon.Ok() && (m_icon.GetHICON() != 0))
|
||||||
return m_icon.GetHICON();
|
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();
|
return Close();
|
||||||
}
|
}
|
||||||
@@ -866,7 +866,7 @@ void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Destroy the window (delayed, if a managed window)
|
// Destroy the window (delayed, if a managed window)
|
||||||
bool wxFrame::Destroy(void)
|
bool wxFrame::Destroy()
|
||||||
{
|
{
|
||||||
if (!wxPendingDelete.Member(this))
|
if (!wxPendingDelete.Member(this))
|
||||||
wxPendingDelete.Append(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;
|
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);
|
return new wxToolBar(this, id, wxDefaultPosition, wxDefaultSize, style, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::PositionToolBar(void)
|
void wxFrame::PositionToolBar()
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT rect;
|
||||||
::GetClientRect((HWND) GetHWND(), &rect);
|
::GetClientRect((HWND) GetHWND(), &rect);
|
||||||
|
@@ -94,7 +94,7 @@ bool wxGauge95::Create(wxWindow *parent, wxWindowID id,
|
|||||||
return TRUE;
|
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;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
|
@@ -142,7 +142,7 @@ bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id,
|
|||||||
return TRUE;
|
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;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
|
@@ -140,7 +140,7 @@ bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Listbox item
|
// Listbox item
|
||||||
wxListBox::wxListBox(void)
|
wxListBox::wxListBox()
|
||||||
{
|
{
|
||||||
m_noItems = 0;
|
m_noItems = 0;
|
||||||
m_selected = 0;
|
m_selected = 0;
|
||||||
@@ -258,7 +258,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxListBox::~wxListBox(void)
|
wxListBox::~wxListBox()
|
||||||
{
|
{
|
||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN
|
||||||
size_t uiCount = m_aItems.Count();
|
size_t uiCount = m_aItems.Count();
|
||||||
@@ -268,7 +268,7 @@ wxListBox::~wxListBox(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::SetupColours(void)
|
void wxListBox::SetupColours()
|
||||||
{
|
{
|
||||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
|
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
|
||||||
SetForegroundColour(GetParent()->GetForegroundColour());
|
SetForegroundColour(GetParent()->GetForegroundColour());
|
||||||
@@ -377,7 +377,7 @@ int wxListBox::FindString(const wxString& s) const
|
|||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::Clear(void)
|
void wxListBox::Clear()
|
||||||
{
|
{
|
||||||
ListBox_ResetContent(hwnd);
|
ListBox_ResetContent(hwnd);
|
||||||
|
|
||||||
@@ -474,7 +474,7 @@ wxString wxListBox::GetString(int N) const
|
|||||||
return wxString(wxBuffer);
|
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;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
@@ -640,13 +640,13 @@ void wxListBox::SetString(int N, const wxString& s)
|
|||||||
#endif //USE_OWNER_DRAWN
|
#endif //USE_OWNER_DRAWN
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListBox::Number (void) const
|
int wxListBox::Number () const
|
||||||
{
|
{
|
||||||
return m_noItems;
|
return m_noItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For single selection items only
|
// For single selection items only
|
||||||
wxString wxListBox::GetStringSelection (void) const
|
wxString wxListBox::GetStringSelection () const
|
||||||
{
|
{
|
||||||
int sel = GetSelection ();
|
int sel = GetSelection ();
|
||||||
if (sel > -1)
|
if (sel > -1)
|
||||||
|
@@ -569,7 +569,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Restored old code.
|
// 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;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
|
@@ -40,7 +40,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSlider95, wxControl)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Slider
|
// Slider
|
||||||
wxSlider95::wxSlider95(void)
|
wxSlider95::wxSlider95()
|
||||||
{
|
{
|
||||||
m_staticValue = 0;
|
m_staticValue = 0;
|
||||||
m_staticMin = 0;
|
m_staticMin = 0;
|
||||||
@@ -264,7 +264,7 @@ void wxSlider95::MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control)
|
|||||||
MSWOnVScroll(wParam, pos, control);
|
MSWOnVScroll(wParam, pos, control);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSlider95::~wxSlider95(void)
|
wxSlider95::~wxSlider95()
|
||||||
{
|
{
|
||||||
if (m_staticMin)
|
if (m_staticMin)
|
||||||
DestroyWindow((HWND) m_staticMin);
|
DestroyWindow((HWND) m_staticMin);
|
||||||
@@ -274,7 +274,7 @@ wxSlider95::~wxSlider95(void)
|
|||||||
DestroyWindow((HWND) m_staticValue);
|
DestroyWindow((HWND) m_staticValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxSlider95::GetValue(void) const
|
int wxSlider95::GetValue() const
|
||||||
{
|
{
|
||||||
return ::SendMessage((HWND) GetHWND(), TBM_GETPOS, 0, 0);
|
return ::SendMessage((HWND) GetHWND(), TBM_GETPOS, 0, 0);
|
||||||
}
|
}
|
||||||
@@ -343,7 +343,7 @@ void wxSlider95::GetPosition(int *x, int *y) const
|
|||||||
*y = point.y;
|
*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 x1 = x;
|
||||||
int y1 = y;
|
int y1 = y;
|
||||||
@@ -553,17 +553,17 @@ void wxSlider95::SetPageSize(int pageSize)
|
|||||||
m_pageSize = pageSize;
|
m_pageSize = pageSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxSlider95::GetPageSize(void) const
|
int wxSlider95::GetPageSize() const
|
||||||
{
|
{
|
||||||
return m_pageSize;
|
return m_pageSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxSlider95::ClearSel(void)
|
void wxSlider95::ClearSel()
|
||||||
{
|
{
|
||||||
::SendMessage( (HWND) GetHWND(), TBM_CLEARSEL, (WPARAM) TRUE, (LPARAM) 0 );
|
::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 );
|
::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 );
|
::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 );
|
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 );
|
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 );
|
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 );
|
::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 );
|
return (int) ::SendMessage( (HWND) GetHWND(), TBM_GETTHUMBLENGTH, (WPARAM) 0, (LPARAM) 0 );
|
||||||
}
|
}
|
||||||
|
@@ -34,7 +34,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSliderMSW, wxControl)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Slider
|
// Slider
|
||||||
wxSliderMSW::wxSliderMSW(void)
|
wxSliderMSW::wxSliderMSW()
|
||||||
{
|
{
|
||||||
m_staticValue = 0;
|
m_staticValue = 0;
|
||||||
m_staticMin = 0;
|
m_staticMin = 0;
|
||||||
@@ -235,7 +235,7 @@ void wxSliderMSW::MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control)
|
|||||||
MSWOnVScroll(wParam, pos, control);
|
MSWOnVScroll(wParam, pos, control);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSliderMSW::~wxSliderMSW(void)
|
wxSliderMSW::~wxSliderMSW()
|
||||||
{
|
{
|
||||||
if (m_staticMin)
|
if (m_staticMin)
|
||||||
DestroyWindow((HWND) m_staticMin);
|
DestroyWindow((HWND) m_staticMin);
|
||||||
@@ -245,7 +245,7 @@ wxSliderMSW::~wxSliderMSW(void)
|
|||||||
DestroyWindow((HWND) m_staticValue);
|
DestroyWindow((HWND) m_staticValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxSliderMSW::GetValue(void) const
|
int wxSliderMSW::GetValue() const
|
||||||
{
|
{
|
||||||
return ::GetScrollPos((HWND) GetHWND(), SB_CTL);
|
return ::GetScrollPos((HWND) GetHWND(), SB_CTL);
|
||||||
}
|
}
|
||||||
@@ -314,7 +314,7 @@ void wxSliderMSW::GetPosition(int *x, int *y) const
|
|||||||
*y = point.y;
|
*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 x1 = x;
|
||||||
int y1 = y;
|
int y1 = y;
|
||||||
@@ -501,16 +501,16 @@ void wxSliderMSW::SetPageSize(int pageSize)
|
|||||||
m_pageSize = pageSize;
|
m_pageSize = pageSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxSliderMSW::GetPageSize(void) const
|
int wxSliderMSW::GetPageSize() const
|
||||||
{
|
{
|
||||||
return m_pageSize;
|
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;
|
m_lineSize = lineSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxSliderMSW::GetLineSize(void) const
|
int wxSliderMSW::GetLineSize() const
|
||||||
{
|
{
|
||||||
return m_lineSize;
|
return m_lineSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxSliderMSW::GetSelEnd(void) const
|
int wxSliderMSW::GetSelEnd() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxSliderMSW::GetSelStart(void) const
|
int wxSliderMSW::GetSelStart() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -542,7 +542,7 @@ void wxSliderMSW::SetThumbLength(int len)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxSliderMSW::GetThumbLength(void) const
|
int wxSliderMSW::GetThumbLength() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -90,7 +90,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
|
|||||||
return TRUE;
|
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;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
|
@@ -102,7 +102,7 @@ void wxStaticBox::SetLabel(const wxString& label)
|
|||||||
SetWindowText((HWND)m_hWnd, (const char *)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;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
|
@@ -94,7 +94,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
|||||||
return TRUE;
|
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;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
|
@@ -311,7 +311,7 @@ void wxTextCtrl::SetValue(const wxString& value)
|
|||||||
SetWindowText((HWND) GetHWND(), (const char *)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;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
|
Reference in New Issue
Block a user