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:
@@ -54,39 +54,38 @@ class WXDLLEXPORT wxCheckBox: public wxControl
|
||||
|
||||
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
|
||||
|
||||
public:
|
||||
int checkWidth ;
|
||||
int checkHeight ;
|
||||
public:
|
||||
int checkWidth;
|
||||
int checkHeight;
|
||||
|
||||
inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
|
||||
inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
|
||||
inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
|
||||
virtual void SetValue(bool);
|
||||
virtual bool GetValue() const ;
|
||||
virtual void SetValue(bool value);
|
||||
virtual bool GetValue() const;
|
||||
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
virtual void SetLabel(const wxBitmap& bitmap);
|
||||
virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
|
||||
|
||||
virtual void SetLabel(const wxBitmap& bitmap);
|
||||
virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
|
||||
protected:
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
};
|
||||
#endif
|
||||
// _WX_CHECKBOX_H_
|
||||
|
@@ -23,70 +23,68 @@ WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
|
||||
// Choice item
|
||||
class WXDLLEXPORT wxChoice: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxChoice)
|
||||
DECLARE_DYNAMIC_CLASS(wxChoice)
|
||||
|
||||
public:
|
||||
wxChoice();
|
||||
~wxChoice();
|
||||
public:
|
||||
wxChoice();
|
||||
~wxChoice();
|
||||
|
||||
inline wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
|
||||
virtual void Append(const wxString& item);
|
||||
virtual void Delete(int n);
|
||||
virtual void Clear();
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual void Append(const wxString& item);
|
||||
virtual void Delete(int n);
|
||||
virtual void Clear();
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual wxString GetString(int n) const ;
|
||||
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
virtual wxString GetStringSelection() const ;
|
||||
virtual bool SetStringSelection(const wxString& sel);
|
||||
|
||||
virtual wxString GetStringSelection() const ;
|
||||
virtual bool SetStringSelection(const wxString& sel);
|
||||
virtual int Number() const { return m_noStrings; }
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
virtual inline int Number() const { return m_noStrings; }
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
virtual void SetColumns(int n = 1 );
|
||||
virtual int GetColumns() const ;
|
||||
|
||||
virtual void SetColumns(int n = 1 );
|
||||
virtual int GetColumns() const ;
|
||||
void SetFocus();
|
||||
|
||||
void SetFocus();
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||
WXWidget GetMainWidget() const { return m_buttonWidget; }
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||
WXWidget GetMainWidget() const { return m_buttonWidget; }
|
||||
|
||||
protected:
|
||||
int m_noStrings;
|
||||
WXWidget m_menuWidget;
|
||||
WXWidget m_buttonWidget;
|
||||
WXWidget* m_widgetList ;
|
||||
WXWidget m_formWidget;
|
||||
wxStringList m_stringList;
|
||||
int m_noStrings;
|
||||
WXWidget m_menuWidget;
|
||||
WXWidget m_buttonWidget;
|
||||
WXWidget* m_widgetList ;
|
||||
WXWidget m_formWidget;
|
||||
wxStringList m_stringList;
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -24,74 +24,73 @@ WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||
// Combobox item
|
||||
class WXDLLEXPORT wxComboBox: public wxChoice
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxComboBox)
|
||||
DECLARE_DYNAMIC_CLASS(wxComboBox)
|
||||
|
||||
public:
|
||||
inline wxComboBox() {}
|
||||
~wxComboBox();
|
||||
public:
|
||||
inline wxComboBox() {}
|
||||
~wxComboBox();
|
||||
|
||||
inline wxComboBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
{
|
||||
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
inline wxComboBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
{
|
||||
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr);
|
||||
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
// List functions
|
||||
virtual void Append(const wxString& item);
|
||||
virtual void Delete(int n);
|
||||
virtual void Clear();
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual wxString GetStringSelection() const ;
|
||||
virtual bool SetStringSelection(const wxString& sel);
|
||||
virtual inline int Number() const { return m_noStrings; }
|
||||
|
||||
// List functions
|
||||
virtual void Append(const wxString& item);
|
||||
virtual void Delete(int n);
|
||||
virtual void Clear();
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual wxString GetStringSelection() const ;
|
||||
virtual bool SetStringSelection(const wxString& sel);
|
||||
virtual inline int Number() const { return m_noStrings; }
|
||||
// Text field functions
|
||||
virtual wxString GetValue() const ;
|
||||
virtual void SetValue(const wxString& value);
|
||||
|
||||
// Text field functions
|
||||
virtual wxString GetValue() const ;
|
||||
virtual void SetValue(const wxString& value);
|
||||
// Clipboard operations
|
||||
virtual void Copy();
|
||||
virtual void Cut();
|
||||
virtual void Paste();
|
||||
virtual void SetInsertionPoint(long pos);
|
||||
virtual void SetInsertionPointEnd();
|
||||
virtual long GetInsertionPoint() const ;
|
||||
virtual long GetLastPosition() const ;
|
||||
virtual void Replace(long from, long to, const wxString& value);
|
||||
virtual void Remove(long from, long to);
|
||||
virtual void SetSelection(long from, long to);
|
||||
virtual void SetEditable(bool editable);
|
||||
|
||||
// Clipboard operations
|
||||
virtual void Copy();
|
||||
virtual void Cut();
|
||||
virtual void Paste();
|
||||
virtual void SetInsertionPoint(long pos);
|
||||
virtual void SetInsertionPointEnd();
|
||||
virtual long GetInsertionPoint() const ;
|
||||
virtual long GetLastPosition() const ;
|
||||
virtual void Replace(long from, long to, const wxString& value);
|
||||
virtual void Remove(long from, long to);
|
||||
virtual void SetSelection(long from, long to);
|
||||
virtual void SetEditable(bool editable);
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_mainWidget; }
|
||||
WXWidget GetMainWidget() const { return m_mainWidget; }
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_mainWidget; }
|
||||
WXWidget GetMainWidget() const { return m_mainWidget; }
|
||||
protected:
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -21,99 +21,98 @@
|
||||
WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr;
|
||||
|
||||
// Dialog boxes
|
||||
class WXDLLEXPORT wxDialog: public wxPanel
|
||||
class WXDLLEXPORT wxDialog : public wxPanel
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||
public:
|
||||
|
||||
wxDialog();
|
||||
|
||||
// Constructor with a modal flag, but no window id - the old convention
|
||||
inline wxDialog(wxWindow *parent,
|
||||
const wxString& title, bool modal,
|
||||
int x = -1, int y= -1, int width = 500, int height = 500,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr)
|
||||
{
|
||||
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
|
||||
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name);
|
||||
}
|
||||
|
||||
// Constructor with no modal flag - the new convention.
|
||||
inline wxDialog(wxWindow *parent, wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& title, // bool modal = FALSE, // TODO make this a window style?
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr);
|
||||
|
||||
~wxDialog();
|
||||
|
||||
virtual bool Destroy();
|
||||
void SetClientSize(int width, int height);
|
||||
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
|
||||
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
|
||||
bool Show(bool show);
|
||||
void Iconize(bool iconize);
|
||||
void Raise();
|
||||
void Lower();
|
||||
|
||||
virtual bool IsIconized() const;
|
||||
void Fit();
|
||||
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const ;
|
||||
|
||||
// bool OnClose();
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
void SetModal(bool flag);
|
||||
|
||||
virtual void Centre(int direction = wxBOTH);
|
||||
virtual bool IsModal() const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
|
||||
|
||||
virtual int ShowModal();
|
||||
virtual void EndModal(int retCode);
|
||||
|
||||
// Standard buttons
|
||||
void OnOK(wxCommandEvent& event);
|
||||
void OnApply(wxCommandEvent& event);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
inline WXWidget GetTopWidget() const { return m_mainWidget; }
|
||||
inline WXWidget GetClientWidget() const { return m_mainWidget; }
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||
|
||||
public:
|
||||
//// Motif-specific
|
||||
bool m_modalShowing;
|
||||
wxString m_dialogTitle;
|
||||
wxDialog();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
// Constructor with a modal flag, but no window id - the old convention
|
||||
wxDialog(wxWindow *parent,
|
||||
const wxString& title, bool modal,
|
||||
int x = -1, int y= -1, int width = 500, int height = 500,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr)
|
||||
{
|
||||
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
|
||||
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name);
|
||||
}
|
||||
|
||||
// Constructor with no modal flag - the new convention.
|
||||
wxDialog(wxWindow *parent, wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& title, // bool modal = FALSE, // TODO make this a window style?
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr);
|
||||
|
||||
~wxDialog();
|
||||
|
||||
virtual bool Destroy();
|
||||
|
||||
bool Show(bool show);
|
||||
void Iconize(bool iconize);
|
||||
void Raise();
|
||||
void Lower();
|
||||
|
||||
virtual bool IsIconized() const;
|
||||
void Fit();
|
||||
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const ;
|
||||
|
||||
// bool OnClose();
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
void SetModal(bool flag);
|
||||
|
||||
virtual void Centre(int direction = wxBOTH);
|
||||
virtual bool IsModal() const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
|
||||
|
||||
virtual int ShowModal();
|
||||
virtual void EndModal(int retCode);
|
||||
|
||||
// Standard buttons
|
||||
void OnOK(wxCommandEvent& event);
|
||||
void OnApply(wxCommandEvent& event);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
inline WXWidget GetTopWidget() const { return m_mainWidget; }
|
||||
inline WXWidget GetClientWidget() const { return m_mainWidget; }
|
||||
|
||||
public:
|
||||
//// Motif-specific
|
||||
bool m_modalShowing;
|
||||
wxString m_dialogTitle;
|
||||
|
||||
protected:
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -26,185 +26,179 @@ WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr;
|
||||
class WXDLLEXPORT wxMenuBar;
|
||||
class WXDLLEXPORT wxStatusBar;
|
||||
|
||||
class WXDLLEXPORT wxFrame: public wxWindow {
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||
class WXDLLEXPORT wxFrame : public wxWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||
|
||||
public:
|
||||
wxFrame();
|
||||
inline wxFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
wxFrame();
|
||||
wxFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
~wxFrame();
|
||||
~wxFrame();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual bool Destroy();
|
||||
virtual bool Destroy();
|
||||
|
||||
void SetClientSize(int width, int height);
|
||||
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
|
||||
void SetClientSize(int width, int height);
|
||||
void GetClientSize(int *width, int *height) const;
|
||||
void GetSize(int *width, int *height) const ;
|
||||
void GetPosition(int *x, int *y) const ;
|
||||
|
||||
void GetClientSize(int *width, int *height) const;
|
||||
wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
|
||||
void ClientToScreen(int *x, int *y) const;
|
||||
wxPoint ClientToScreen(const wxPoint& pt) const { return wxWindow::ClientToScreen(pt); }
|
||||
|
||||
void GetSize(int *width, int *height) const ;
|
||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
||||
void ScreenToClient(int *x, int *y) const;
|
||||
wxPoint ScreenToClient(const wxPoint& pt) const { return wxWindow::ScreenToClient(pt); }
|
||||
|
||||
void GetPosition(int *x, int *y) const ;
|
||||
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMenuHighlight(wxMenuEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
bool Show(bool show);
|
||||
|
||||
void ClientToScreen(int *x, int *y) const;
|
||||
wxPoint ClientToScreen(const wxPoint& pt) const { return wxWindow::ClientToScreen(pt); }
|
||||
// Set menu bar
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
virtual wxMenuBar *GetMenuBar() const ;
|
||||
|
||||
void ScreenToClient(int *x, int *y) const;
|
||||
wxPoint ScreenToClient(const wxPoint& pt) const { return wxWindow::ScreenToClient(pt); }
|
||||
// Set title
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const { return m_title; }
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMenuHighlight(wxMenuEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void Centre(int direction = wxBOTH);
|
||||
|
||||
bool Show(bool show);
|
||||
// Call this to simulate a menu command
|
||||
virtual void Command(int id);
|
||||
virtual void ProcessCommand(int id);
|
||||
|
||||
// Set menu bar
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
virtual wxMenuBar *GetMenuBar() const ;
|
||||
// Set icon
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
|
||||
// Set title
|
||||
void SetTitle(const wxString& title);
|
||||
inline wxString GetTitle() const { return m_title; }
|
||||
// Create status line
|
||||
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
|
||||
const wxString& name = "statusBar");
|
||||
wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
|
||||
virtual void PositionStatusBar();
|
||||
virtual wxStatusBar *OnCreateStatusBar(int number, long style, wxWindowID id,
|
||||
const wxString& name);
|
||||
|
||||
void Centre(int direction = wxBOTH);
|
||||
|
||||
// Call this to simulate a menu command
|
||||
virtual void Command(int id);
|
||||
virtual void ProcessCommand(int id);
|
||||
|
||||
// Set icon
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
|
||||
// Create status line
|
||||
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
|
||||
const wxString& name = "statusBar");
|
||||
inline wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
|
||||
virtual void PositionStatusBar();
|
||||
virtual wxStatusBar *OnCreateStatusBar(int number, long style, wxWindowID id,
|
||||
const wxString& name);
|
||||
|
||||
// Create toolbar
|
||||
// Create toolbar
|
||||
#if wxUSE_TOOLBAR
|
||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxToolBarNameStr);
|
||||
virtual wxToolBar *OnCreateToolBar(long style, wxWindowID id, const wxString& name);
|
||||
// If made known to the frame, the frame will manage it automatically.
|
||||
virtual void SetToolBar(wxToolBar *toolbar) ;
|
||||
virtual wxToolBar *GetToolBar() const ;
|
||||
virtual void PositionToolBar();
|
||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxToolBarNameStr);
|
||||
virtual wxToolBar *OnCreateToolBar(long style, wxWindowID id, const wxString& name);
|
||||
// If made known to the frame, the frame will manage it automatically.
|
||||
virtual void SetToolBar(wxToolBar *toolbar) ;
|
||||
virtual wxToolBar *GetToolBar() const ;
|
||||
virtual void PositionToolBar();
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
// Set status line text
|
||||
virtual void SetStatusText(const wxString& text, int number = 0);
|
||||
// Set status line text
|
||||
virtual void SetStatusText(const wxString& text, int number = 0);
|
||||
|
||||
// Set status line widths
|
||||
virtual void SetStatusWidths(int n, const int widths_field[]);
|
||||
// Set status line widths
|
||||
virtual void SetStatusWidths(int n, const int widths_field[]);
|
||||
|
||||
// Hint to tell framework which status bar to use
|
||||
// TODO: should this go into a wxFrameworkSettings class perhaps?
|
||||
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
|
||||
static bool UsesNativeStatusBar() { return m_useNativeStatusBar; };
|
||||
// Hint to tell framework which status bar to use
|
||||
// TODO: should this go into a wxFrameworkSettings class perhaps?
|
||||
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
|
||||
static bool UsesNativeStatusBar() { return m_useNativeStatusBar; };
|
||||
|
||||
// Fit frame around subwindows
|
||||
virtual void Fit();
|
||||
// Fit frame around subwindows
|
||||
virtual void Fit();
|
||||
|
||||
// Iconize
|
||||
virtual void Iconize(bool iconize);
|
||||
// Iconize
|
||||
virtual void Iconize(bool iconize);
|
||||
|
||||
virtual bool IsIconized() const ;
|
||||
virtual bool IsIconized() const ;
|
||||
|
||||
// Compatibility
|
||||
inline bool Iconized() const { return IsIconized(); }
|
||||
// Compatibility
|
||||
bool Iconized() const { return IsIconized(); }
|
||||
|
||||
// Is the frame maximized? Returns FALSE under Motif (but TRUE for
|
||||
// wxMDIChildFrame due to the tabbed implementation).
|
||||
virtual bool IsMaximized(void) const ;
|
||||
// Is the frame maximized? Returns FALSE under Motif (but TRUE for
|
||||
// wxMDIChildFrame due to the tabbed implementation).
|
||||
virtual bool IsMaximized(void) const ;
|
||||
|
||||
virtual void Maximize(bool maximize);
|
||||
virtual void Maximize(bool maximize);
|
||||
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
// Query app for menu item updates (called from OnIdle)
|
||||
void DoMenuUpdates();
|
||||
void DoMenuUpdates(wxMenu* menu);
|
||||
// Query app for menu item updates (called from OnIdle)
|
||||
void DoMenuUpdates();
|
||||
void DoMenuUpdates(wxMenu* menu);
|
||||
|
||||
// Checks if there is a toolbar, and returns the first free client position
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
// Checks if there is a toolbar, and returns the first free client position
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
|
||||
virtual void Raise();
|
||||
virtual void Lower();
|
||||
virtual void Raise();
|
||||
virtual void Lower();
|
||||
|
||||
virtual void CaptureMouse();
|
||||
virtual void ReleaseMouse();
|
||||
virtual void CaptureMouse();
|
||||
virtual void ReleaseMouse();
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetMenuBarWidget() const ;
|
||||
inline WXWidget GetShellWidget() const { return m_frameShell; }
|
||||
inline WXWidget GetWorkAreaWidget() const { return m_workArea; }
|
||||
inline WXWidget GetClientAreaWidget() const { return m_clientArea; }
|
||||
inline WXWidget GetTopWidget() const { return m_frameShell; }
|
||||
inline WXWidget GetMainWindowWidget() const { return m_frameWidget; }
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetMenuBarWidget() const ;
|
||||
WXWidget GetShellWidget() const { return m_frameShell; }
|
||||
WXWidget GetWorkAreaWidget() const { return m_workArea; }
|
||||
WXWidget GetClientAreaWidget() const { return m_clientArea; }
|
||||
WXWidget GetTopWidget() const { return m_frameShell; }
|
||||
WXWidget GetMainWindowWidget() const { return m_frameWidget; }
|
||||
|
||||
// The widget that can have children on it
|
||||
WXWidget GetClientWidget() const;
|
||||
bool GetVisibleStatus() const { return m_visibleStatus; }
|
||||
// The widget that can have children on it
|
||||
WXWidget GetClientWidget() const;
|
||||
bool GetVisibleStatus() const { return m_visibleStatus; }
|
||||
|
||||
bool PreResize();
|
||||
bool PreResize();
|
||||
|
||||
protected:
|
||||
wxMenuBar * m_frameMenuBar;
|
||||
wxStatusBar * m_frameStatusBar;
|
||||
wxIcon m_icon;
|
||||
bool m_iconized;
|
||||
static bool m_useNativeStatusBar;
|
||||
wxMenuBar * m_frameMenuBar;
|
||||
wxStatusBar * m_frameStatusBar;
|
||||
wxIcon m_icon;
|
||||
bool m_iconized;
|
||||
static bool m_useNativeStatusBar;
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
wxToolBar * m_frameToolBar ;
|
||||
wxToolBar * m_frameToolBar ;
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
//// Motif-specific
|
||||
//// Motif-specific
|
||||
|
||||
WXWidget m_frameShell;
|
||||
WXWidget m_frameWidget;
|
||||
WXWidget m_workArea;
|
||||
WXWidget m_clientArea;
|
||||
// WXWidget m_menuBarWidget;
|
||||
bool m_visibleStatus;
|
||||
wxString m_title;
|
||||
WXWidget m_frameShell;
|
||||
WXWidget m_frameWidget;
|
||||
WXWidget m_workArea;
|
||||
WXWidget m_clientArea;
|
||||
// WXWidget m_menuBarWidget;
|
||||
bool m_visibleStatus;
|
||||
wxString m_title;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -21,57 +21,52 @@
|
||||
WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
|
||||
|
||||
// Group box
|
||||
class WXDLLEXPORT wxGauge: public wxControl
|
||||
class WXDLLEXPORT wxGauge : public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGauge)
|
||||
public:
|
||||
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
|
||||
DECLARE_DYNAMIC_CLASS(wxGauge)
|
||||
|
||||
inline wxGauge(wxWindow *parent, wxWindowID id,
|
||||
int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr)
|
||||
{
|
||||
Create(parent, id, range, pos, size, style, validator, name);
|
||||
}
|
||||
public:
|
||||
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr);
|
||||
inline wxGauge(wxWindow *parent, wxWindowID id,
|
||||
int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr)
|
||||
{
|
||||
Create(parent, id, range, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
void SetShadowWidth(int w);
|
||||
void SetBezelFace(int w);
|
||||
void SetRange(int r);
|
||||
void SetValue(int pos);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr);
|
||||
|
||||
int GetShadowWidth() const ;
|
||||
int GetBezelFace() const ;
|
||||
int GetRange() const ;
|
||||
int GetValue() const ;
|
||||
void SetShadowWidth(int w);
|
||||
void SetBezelFace(int w);
|
||||
void SetRange(int r);
|
||||
void SetValue(int pos);
|
||||
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
int GetShadowWidth() const ;
|
||||
int GetBezelFace() const ;
|
||||
int GetRange() const ;
|
||||
int GetValue() const ;
|
||||
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
protected:
|
||||
int m_rangeMax;
|
||||
int m_gaugePos;
|
||||
protected:
|
||||
int m_rangeMax;
|
||||
int m_gaugePos;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -28,86 +28,84 @@ WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||
// List box item
|
||||
class WXDLLEXPORT wxListBox: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||
|
||||
wxListBox();
|
||||
inline wxListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr):
|
||||
m_clientDataList(wxKEY_INTEGER)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
public:
|
||||
wxListBox();
|
||||
wxListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr):
|
||||
m_clientDataList(wxKEY_INTEGER)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
~wxListBox();
|
||||
~wxListBox();
|
||||
|
||||
virtual void Append(const wxString& item);
|
||||
virtual void Append(const wxString& item, char *clientData);
|
||||
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
|
||||
virtual int FindString(const wxString& s) const ;
|
||||
virtual void Clear();
|
||||
virtual void SetSelection(int n, bool select = TRUE);
|
||||
virtual void Append(const wxString& item);
|
||||
virtual void Append(const wxString& item, char *clientData);
|
||||
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
|
||||
virtual int FindString(const wxString& s) const ;
|
||||
virtual void Clear();
|
||||
virtual void SetSelection(int n, bool select = TRUE);
|
||||
|
||||
virtual void Deselect(int n);
|
||||
virtual void Deselect(int n);
|
||||
|
||||
// For single choice list item only
|
||||
virtual int GetSelection() const ;
|
||||
virtual void Delete(int n);
|
||||
virtual char *GetClientData(int n) const ;
|
||||
virtual void *GetClientData() { return wxWindow::GetClientData(); }
|
||||
virtual void SetClientData(int n, char *clientData);
|
||||
virtual void SetClientData( void *data ) { wxWindow::SetClientData(data); }
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
// For single choice list item only
|
||||
virtual int GetSelection() const ;
|
||||
virtual void Delete(int n);
|
||||
virtual char *GetClientData(int n) const ;
|
||||
virtual void *GetClientData() { return wxWindow::GetClientData(); }
|
||||
virtual void SetClientData(int n, char *clientData);
|
||||
virtual void SetClientData( void *data ) { wxWindow::SetClientData(data); }
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
|
||||
// For single or multiple choice list item
|
||||
virtual int GetSelections(wxArrayInt& aSelections) const;
|
||||
virtual bool Selected(int n) const ;
|
||||
virtual wxString GetString(int n) const ;
|
||||
// For single or multiple choice list item
|
||||
virtual int GetSelections(wxArrayInt& aSelections) const;
|
||||
virtual bool Selected(int n) const ;
|
||||
virtual wxString GetString(int n) const ;
|
||||
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
// Set the specified item at the first visible item
|
||||
// or scroll to max range.
|
||||
virtual void SetFirstItem(int n) ;
|
||||
virtual void SetFirstItem(const wxString& s) ;
|
||||
|
||||
// Set the specified item at the first visible item
|
||||
// or scroll to max range.
|
||||
virtual void SetFirstItem(int n) ;
|
||||
virtual void SetFirstItem(const wxString& s) ;
|
||||
virtual void InsertItems(int nItems, const wxString items[], int pos);
|
||||
|
||||
virtual void InsertItems(int nItems, const wxString items[], int pos);
|
||||
virtual wxString GetStringSelection() const ;
|
||||
virtual bool SetStringSelection(const wxString& s, bool flag = TRUE);
|
||||
virtual int Number() const ;
|
||||
|
||||
virtual wxString GetStringSelection() const ;
|
||||
virtual bool SetStringSelection(const wxString& s, bool flag = TRUE);
|
||||
virtual int Number() const ;
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const;
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const;
|
||||
|
||||
protected:
|
||||
int m_noItems;
|
||||
int m_selected;
|
||||
int m_noItems;
|
||||
int m_selected;
|
||||
|
||||
// List mapping positions->client data
|
||||
wxList m_clientDataList;
|
||||
// List mapping positions->client data
|
||||
wxList m_clientDataList;
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -117,91 +117,83 @@ DECLARE_EVENT_TABLE()
|
||||
class WXDLLEXPORT wxMDIChildFrame: public wxFrame
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
|
||||
|
||||
public:
|
||||
wxMDIChildFrame();
|
||||
wxMDIChildFrame(wxMDIParentFrame *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
wxMDIChildFrame();
|
||||
inline wxMDIChildFrame(wxMDIParentFrame *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
~wxMDIChildFrame();
|
||||
|
||||
~wxMDIChildFrame();
|
||||
bool Create(wxMDIParentFrame *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
bool Create(wxMDIParentFrame *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
// Set menu bar
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
void SetTitle(const wxString& title);
|
||||
|
||||
// Set menu bar
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
void SetTitle(const wxString& title);
|
||||
void SetClientSize(int width, int height);
|
||||
void GetClientSize(int *width, int *height);
|
||||
void GetSize(int *width, int *height) const;
|
||||
void GetPosition(int *x, int *y) const ;
|
||||
|
||||
void SetClientSize(int width, int height);
|
||||
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
|
||||
// Set icon
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
|
||||
void GetClientSize(int *width, int *height) const;
|
||||
wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
|
||||
// Override wxFrame operations
|
||||
void CaptureMouse();
|
||||
void ReleaseMouse();
|
||||
void Raise();
|
||||
void Lower(void);
|
||||
void SetSizeHints(int minW = -1, int minH = -1, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1);
|
||||
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
// MDI operations
|
||||
virtual void Maximize();
|
||||
virtual void Maximize(bool WXUNUSED(maximize)) { };
|
||||
inline void Minimize() { Iconize(TRUE); };
|
||||
virtual void Iconize(bool iconize);
|
||||
virtual void Restore();
|
||||
virtual void Activate();
|
||||
virtual bool IsIconized() const ;
|
||||
|
||||
void GetSize(int *width, int *height) const;
|
||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
||||
// Is the frame maximized? Returns TRUE for
|
||||
// wxMDIChildFrame due to the tabbed implementation.
|
||||
virtual bool IsMaximized(void) const ;
|
||||
|
||||
void GetPosition(int *x, int *y) const ;
|
||||
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
|
||||
bool Show(bool show);
|
||||
|
||||
// Set icon
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
WXWidget GetMainWidget() const { return m_mainWidget; };
|
||||
WXWidget GetTopWidget() const { return m_mainWidget; };
|
||||
WXWidget GetClientWidget() const { return m_mainWidget; };
|
||||
|
||||
// Override wxFrame operations
|
||||
void CaptureMouse();
|
||||
void ReleaseMouse();
|
||||
void Raise();
|
||||
void Lower(void);
|
||||
void SetSizeHints(int minW = -1, int minH = -1, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1);
|
||||
/*
|
||||
virtual void OnRaise();
|
||||
virtual void OnLower();
|
||||
*/
|
||||
|
||||
// MDI operations
|
||||
virtual void Maximize();
|
||||
virtual void Maximize(bool WXUNUSED(maximize)) { };
|
||||
inline void Minimize() { Iconize(TRUE); };
|
||||
virtual void Iconize(bool iconize);
|
||||
virtual void Restore();
|
||||
virtual void Activate();
|
||||
virtual bool IsIconized() const ;
|
||||
|
||||
// Is the frame maximized? Returns TRUE for
|
||||
// wxMDIChildFrame due to the tabbed implementation.
|
||||
virtual bool IsMaximized(void) const ;
|
||||
|
||||
bool Show(bool show);
|
||||
|
||||
inline WXWidget GetMainWidget() const { return m_mainWidget; };
|
||||
inline WXWidget GetTopWidget() const { return m_mainWidget; };
|
||||
inline WXWidget GetClientWidget() const { return m_mainWidget; };
|
||||
|
||||
/*
|
||||
virtual void OnRaise();
|
||||
virtual void OnLower();
|
||||
*/
|
||||
|
||||
inline void SetMDIParentFrame(wxMDIParentFrame* parentFrame) { m_mdiParentFrame = parentFrame; }
|
||||
inline wxMDIParentFrame* GetMDIParentFrame() const { return m_mdiParentFrame; }
|
||||
void SetMDIParentFrame(wxMDIParentFrame* parentFrame) { m_mdiParentFrame = parentFrame; }
|
||||
wxMDIParentFrame* GetMDIParentFrame() const { return m_mdiParentFrame; }
|
||||
|
||||
protected:
|
||||
wxMDIParentFrame* m_mdiParentFrame;
|
||||
wxMDIParentFrame* m_mdiParentFrame;
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
};
|
||||
|
||||
/* The client window is a child of the parent MDI frame, and itself
|
||||
@@ -213,47 +205,38 @@ protected:
|
||||
|
||||
class WXDLLEXPORT wxMDIClientWindow: public wxNotebook
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
|
||||
|
||||
wxMDIClientWindow() ;
|
||||
inline wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0)
|
||||
{
|
||||
CreateClient(parent, style);
|
||||
}
|
||||
public:
|
||||
wxMDIClientWindow() ;
|
||||
wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0)
|
||||
{
|
||||
CreateClient(parent, style);
|
||||
}
|
||||
|
||||
~wxMDIClientWindow();
|
||||
~wxMDIClientWindow();
|
||||
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
void GetClientSize(int *width, int *height) const;
|
||||
void GetSize(int *width, int *height) const ;
|
||||
void GetPosition(int *x, int *y) const ;
|
||||
|
||||
void SetClientSize(int width, int height);
|
||||
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
|
||||
// Note: this is virtual, to allow overridden behaviour.
|
||||
virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
|
||||
|
||||
void GetClientSize(int *width, int *height) const;
|
||||
wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
|
||||
// Explicitly call default scroll behaviour
|
||||
void OnScroll(wxScrollEvent& event);
|
||||
|
||||
void GetSize(int *width, int *height) const ;
|
||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
||||
|
||||
void GetPosition(int *x, int *y) const ;
|
||||
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
|
||||
|
||||
// Note: this is virtual, to allow overridden behaviour.
|
||||
virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
|
||||
|
||||
// Explicitly call default scroll behaviour
|
||||
void OnScroll(wxScrollEvent& event);
|
||||
|
||||
// Implementation
|
||||
void OnPageChanged(wxNotebookEvent& event);
|
||||
// Implementation
|
||||
void OnPageChanged(wxNotebookEvent& event);
|
||||
|
||||
protected:
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -23,77 +23,77 @@ WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr;
|
||||
// List box item
|
||||
class WXDLLEXPORT wxBitmap ;
|
||||
|
||||
class WXDLLEXPORT wxRadioBox: public wxControl
|
||||
class WXDLLEXPORT wxRadioBox : public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||
|
||||
public:
|
||||
wxRadioBox();
|
||||
wxRadioBox();
|
||||
|
||||
inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
|
||||
}
|
||||
wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
|
||||
}
|
||||
|
||||
~wxRadioBox();
|
||||
~wxRadioBox();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
|
||||
|
||||
int FindString(const wxString& s) const;
|
||||
void SetSelection(int N);
|
||||
int GetSelection() const;
|
||||
wxString GetString(int N) const;
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
int FindString(const wxString& s) const;
|
||||
void SetSelection(int N);
|
||||
int GetSelection() const;
|
||||
wxString GetString(int N) const;
|
||||
|
||||
void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
|
||||
void SetLabel(int item, const wxString& label) ;
|
||||
wxString GetLabel(int item) const;
|
||||
wxString GetLabel() const { return wxControl::GetLabel(); };
|
||||
void Enable(bool enable);
|
||||
void Enable(int item, bool enable);
|
||||
void Show(int item, bool show) ;
|
||||
bool Show(bool show) ;
|
||||
void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
|
||||
void SetLabel(int item, const wxString& label) ;
|
||||
wxString GetLabel(int item) const;
|
||||
wxString GetLabel() const { return wxControl::GetLabel(); };
|
||||
void Enable(bool enable);
|
||||
void Enable(int item, bool enable);
|
||||
void Show(int item, bool show) ;
|
||||
bool Show(bool show) ;
|
||||
|
||||
virtual wxString GetStringSelection() const;
|
||||
virtual bool SetStringSelection(const wxString& s);
|
||||
inline virtual int Number() const { return m_noItems; } ;
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
|
||||
inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
||||
virtual wxString GetStringSelection() const;
|
||||
virtual bool SetStringSelection(const wxString& s);
|
||||
virtual int Number() const { return m_noItems; } ;
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||
WXWidget GetLabelWidget() const { return m_labelWidget; }
|
||||
WXWidget GetFrameWidget() const { return m_frameWidget; }
|
||||
inline WXWidget* GetRadioButtons() const { return m_radioButtons; }
|
||||
inline void SetSel(int i) { m_selectedButton = i; }
|
||||
int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
|
||||
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||
WXWidget GetLabelWidget() const { return m_labelWidget; }
|
||||
WXWidget GetFrameWidget() const { return m_frameWidget; }
|
||||
inline WXWidget* GetRadioButtons() const { return m_radioButtons; }
|
||||
inline void SetSel(int i) { m_selectedButton = i; }
|
||||
|
||||
protected:
|
||||
int m_majorDim ;
|
||||
int m_noItems;
|
||||
int m_noRowsOrCols;
|
||||
int m_selectedButton;
|
||||
int m_majorDim ;
|
||||
int m_noItems;
|
||||
int m_noRowsOrCols;
|
||||
int m_selectedButton;
|
||||
|
||||
WXWidget m_formWidget;
|
||||
WXWidget m_labelWidget;
|
||||
WXWidget m_frameWidget;
|
||||
WXWidget* m_radioButtons;
|
||||
wxString* m_radioButtonLabels;
|
||||
WXWidget m_formWidget;
|
||||
WXWidget m_labelWidget;
|
||||
WXWidget m_frameWidget;
|
||||
WXWidget* m_radioButtons;
|
||||
wxString* m_radioButtonLabels;
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -23,78 +23,78 @@ WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
|
||||
// Slider
|
||||
class WXDLLEXPORT wxSlider: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSlider)
|
||||
DECLARE_DYNAMIC_CLASS(wxSlider)
|
||||
|
||||
public:
|
||||
wxSlider();
|
||||
wxSlider();
|
||||
|
||||
inline wxSlider(wxWindow *parent, wxWindowID id,
|
||||
int value, int minValue, int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr)
|
||||
{
|
||||
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
||||
}
|
||||
wxSlider(wxWindow *parent, wxWindowID id,
|
||||
int value, int minValue, int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr)
|
||||
{
|
||||
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
~wxSlider();
|
||||
~wxSlider();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
int value, int minValue, int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
int value, int minValue, int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr);
|
||||
|
||||
virtual int GetValue() const ;
|
||||
virtual void SetValue(int);
|
||||
void GetSize(int *x, int *y) const ;
|
||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
||||
virtual int GetValue() const ;
|
||||
virtual void SetValue(int);
|
||||
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
void GetSize(int *x, int *y) const ;
|
||||
|
||||
void SetRange(int minValue, int maxValue);
|
||||
void SetRange(int minValue, int maxValue);
|
||||
|
||||
inline int GetMin() const { return m_rangeMin; }
|
||||
inline int GetMax() const { return m_rangeMax; }
|
||||
inline int GetMin() const { return m_rangeMin; }
|
||||
inline int GetMax() const { return m_rangeMax; }
|
||||
|
||||
// For trackbars only
|
||||
void SetTickFreq(int n, int pos);
|
||||
inline int GetTickFreq() const { return m_tickFreq; }
|
||||
void SetPageSize(int pageSize);
|
||||
int GetPageSize() const ;
|
||||
void ClearSel() ;
|
||||
void ClearTicks() ;
|
||||
void SetLineSize(int lineSize);
|
||||
int GetLineSize() const ;
|
||||
int GetSelEnd() const ;
|
||||
int GetSelStart() const ;
|
||||
void SetSelection(int minPos, int maxPos);
|
||||
void SetThumbLength(int len) ;
|
||||
int GetThumbLength() const ;
|
||||
void SetTick(int tickPos) ;
|
||||
// For trackbars only
|
||||
void SetTickFreq(int n, int pos);
|
||||
inline int GetTickFreq() const { return m_tickFreq; }
|
||||
void SetPageSize(int pageSize);
|
||||
int GetPageSize() const ;
|
||||
void ClearSel() ;
|
||||
void ClearTicks() ;
|
||||
void SetLineSize(int lineSize);
|
||||
int GetLineSize() const ;
|
||||
int GetSelEnd() const ;
|
||||
int GetSelStart() const ;
|
||||
void SetSelection(int minPos, int maxPos);
|
||||
void SetThumbLength(int len) ;
|
||||
int GetThumbLength() const ;
|
||||
void SetTick(int tickPos) ;
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
protected:
|
||||
int m_rangeMin;
|
||||
int m_rangeMax;
|
||||
int m_pageSize;
|
||||
int m_lineSize;
|
||||
int m_tickFreq;
|
||||
DECLARE_EVENT_TABLE()
|
||||
protected:
|
||||
int m_rangeMin;
|
||||
int m_rangeMax;
|
||||
int m_pageSize;
|
||||
int m_lineSize;
|
||||
int m_tickFreq;
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -20,54 +20,48 @@
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
|
||||
|
||||
class WXDLLEXPORT wxStaticBitmap: public wxControl
|
||||
class WXDLLEXPORT wxStaticBitmap : public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
||||
public:
|
||||
inline wxStaticBitmap() { }
|
||||
~wxStaticBitmap();
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
||||
|
||||
inline wxStaticBitmap(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBitmapNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, name);
|
||||
}
|
||||
public:
|
||||
wxStaticBitmap() { }
|
||||
~wxStaticBitmap();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBitmapNameStr);
|
||||
wxStaticBitmap(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBitmapNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, name);
|
||||
}
|
||||
|
||||
virtual void SetBitmap(const wxBitmap& bitmap);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBitmapNameStr);
|
||||
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void SetBitmap(const wxBitmap& bitmap);
|
||||
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||
|
||||
inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
|
||||
wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
|
||||
|
||||
// overriden base class virtuals
|
||||
virtual bool AcceptsFocus() const { return FALSE; }
|
||||
// overriden base class virtuals
|
||||
virtual bool AcceptsFocus() const { return FALSE; }
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
protected:
|
||||
wxBitmap m_messageBitmap;
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
protected:
|
||||
wxBitmap m_messageBitmap;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -23,53 +23,52 @@ WXDLLEXPORT_DATA(extern const char*) wxStaticBoxNameStr;
|
||||
// Group box
|
||||
class WXDLLEXPORT wxStaticBox: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
||||
|
||||
public:
|
||||
wxStaticBox();
|
||||
inline wxStaticBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, name);
|
||||
}
|
||||
~wxStaticBox();
|
||||
public:
|
||||
wxStaticBox();
|
||||
wxStaticBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, name);
|
||||
}
|
||||
~wxStaticBox();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBoxNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBoxNameStr);
|
||||
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
void SetLabel(const wxString& label);
|
||||
wxString GetLabel() const;
|
||||
|
||||
void SetLabel(const wxString& label);
|
||||
wxString GetLabel() const;
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||
WXWidget GetLabelWidget() const { return m_labelWidget; }
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||
WXWidget GetLabelWidget() const { return m_labelWidget; }
|
||||
|
||||
protected:
|
||||
// Motif-specific
|
||||
WXWidget m_formWidget;
|
||||
WXWidget m_labelWidget;
|
||||
// Motif-specific
|
||||
WXWidget m_formWidget;
|
||||
WXWidget m_labelWidget;
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user