added default parameter values to the overloaded Show() and Enable() versions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: button.h
|
// Name: wx/gtk/button.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
// Copyright: (c) 1998 Robert Roebling
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef __GTKBUTTONH__
|
#ifndef __GTKBUTTONH__
|
||||||
@@ -39,7 +39,7 @@ class wxButton: public wxControl
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxButton();
|
wxButton();
|
||||||
inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
|
wxButton(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,
|
||||||
@@ -47,23 +47,25 @@ public:
|
|||||||
{
|
{
|
||||||
Create(parent, id, label, pos, size, style, validator, name);
|
Create(parent, id, label, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
~wxButton();
|
virtual ~wxButton();
|
||||||
|
|
||||||
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 = wxButtonNameStr);
|
const wxString& name = wxButtonNameStr);
|
||||||
|
|
||||||
virtual void SetDefault();
|
virtual void SetDefault();
|
||||||
void SetLabel( const wxString &label );
|
virtual void SetLabel( const wxString &label );
|
||||||
bool Enable( bool enable );
|
virtual bool Enable( bool enable = TRUE );
|
||||||
|
|
||||||
static wxSize GetDefaultSize();
|
static wxSize GetDefaultSize();
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
void ApplyWidgetStyle();
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual wxSize DoGetBestSize() const;
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: checkbox.h
|
// Name: wx/gtk/checkbox.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
@@ -42,8 +42,8 @@ public:
|
|||||||
void SetValue( bool state );
|
void SetValue( bool state );
|
||||||
bool GetValue() const;
|
bool GetValue() const;
|
||||||
|
|
||||||
void SetLabel( const wxString& label );
|
virtual void SetLabel( const wxString& label );
|
||||||
bool Enable( bool enable );
|
virtual bool Enable( bool enable = TRUE );
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
// --------------
|
// --------------
|
||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
|
|
||||||
GtkWidget *m_widgetCheckbox;
|
GtkWidget *m_widgetCheckbox;
|
||||||
GtkWidget *m_widgetLabel;
|
GtkWidget *m_widgetLabel;
|
||||||
|
|
||||||
bool m_blockEvent;
|
bool m_blockEvent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: radiobox.h
|
// Name: wx/gtk/radiobox.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
// Copyright: (c) 1998 Robert Roebling
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ public:
|
|||||||
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();
|
virtual ~wxRadioBox();
|
||||||
bool Create(wxWindow *parent,
|
bool Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
@@ -81,10 +81,10 @@ public:
|
|||||||
#endif // WXWIN_COMPATIBILITY_2_2
|
#endif // WXWIN_COMPATIBILITY_2_2
|
||||||
|
|
||||||
// we have to override those to avoid virtual function name hiding
|
// we have to override those to avoid virtual function name hiding
|
||||||
wxString GetLabel() const { return wxControl::GetLabel(); }
|
virtual wxString GetLabel() const { return wxControl::GetLabel(); }
|
||||||
void SetLabel( const wxString& label );
|
virtual void SetLabel( const wxString& label );
|
||||||
bool Show( bool show );
|
virtual bool Show( bool show = TRUE );
|
||||||
bool Enable( bool enable );
|
virtual bool Enable( bool enable = TRUE );
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
// --------------
|
// --------------
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: radiobut.h
|
// Name: wx/gtk/radiobut.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
// Copyright: (c) 1998 Robert Roebling
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ public:
|
|||||||
virtual void SetLabel(const wxString& label);
|
virtual void SetLabel(const wxString& label);
|
||||||
virtual void SetValue(bool val);
|
virtual void SetValue(bool val);
|
||||||
virtual bool GetValue() const;
|
virtual bool GetValue() const;
|
||||||
virtual bool Enable( bool enable );
|
virtual bool Enable( bool enable = TRUE );
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: textctrl.h
|
// Name: wx/gtk/textctrl.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Created: 01/02/97
|
||||||
@@ -15,12 +15,6 @@
|
|||||||
#pragma interface "textctrl.h"
|
#pragma interface "textctrl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// classes
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
class wxTextCtrl;
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxTextCtrl
|
// wxTextCtrl
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -114,7 +108,7 @@ public:
|
|||||||
virtual void SetSelection(long from, long to);
|
virtual void SetSelection(long from, long to);
|
||||||
virtual void SetEditable(bool editable);
|
virtual void SetEditable(bool editable);
|
||||||
|
|
||||||
virtual bool Enable( bool enable );
|
virtual bool Enable( bool enable = TRUE );
|
||||||
|
|
||||||
// Implementation from now on
|
// Implementation from now on
|
||||||
void OnDropFiles( wxDropFilesEvent &event );
|
void OnDropFiles( wxDropFilesEvent &event );
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: button.h
|
// Name: wx/gtk/button.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
// Copyright: (c) 1998 Robert Roebling
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef __GTKBUTTONH__
|
#ifndef __GTKBUTTONH__
|
||||||
@@ -39,7 +39,7 @@ class wxButton: public wxControl
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxButton();
|
wxButton();
|
||||||
inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
|
wxButton(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,
|
||||||
@@ -47,23 +47,25 @@ public:
|
|||||||
{
|
{
|
||||||
Create(parent, id, label, pos, size, style, validator, name);
|
Create(parent, id, label, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
~wxButton();
|
virtual ~wxButton();
|
||||||
|
|
||||||
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 = wxButtonNameStr);
|
const wxString& name = wxButtonNameStr);
|
||||||
|
|
||||||
virtual void SetDefault();
|
virtual void SetDefault();
|
||||||
void SetLabel( const wxString &label );
|
virtual void SetLabel( const wxString &label );
|
||||||
bool Enable( bool enable );
|
virtual bool Enable( bool enable = TRUE );
|
||||||
|
|
||||||
static wxSize GetDefaultSize();
|
static wxSize GetDefaultSize();
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
void ApplyWidgetStyle();
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual wxSize DoGetBestSize() const;
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: checkbox.h
|
// Name: wx/gtk/checkbox.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
@@ -42,8 +42,8 @@ public:
|
|||||||
void SetValue( bool state );
|
void SetValue( bool state );
|
||||||
bool GetValue() const;
|
bool GetValue() const;
|
||||||
|
|
||||||
void SetLabel( const wxString& label );
|
virtual void SetLabel( const wxString& label );
|
||||||
bool Enable( bool enable );
|
virtual bool Enable( bool enable = TRUE );
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
// --------------
|
// --------------
|
||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
|
|
||||||
GtkWidget *m_widgetCheckbox;
|
GtkWidget *m_widgetCheckbox;
|
||||||
GtkWidget *m_widgetLabel;
|
GtkWidget *m_widgetLabel;
|
||||||
|
|
||||||
bool m_blockEvent;
|
bool m_blockEvent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: radiobox.h
|
// Name: wx/gtk/radiobox.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
// Copyright: (c) 1998 Robert Roebling
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ public:
|
|||||||
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();
|
virtual ~wxRadioBox();
|
||||||
bool Create(wxWindow *parent,
|
bool Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
@@ -81,10 +81,10 @@ public:
|
|||||||
#endif // WXWIN_COMPATIBILITY_2_2
|
#endif // WXWIN_COMPATIBILITY_2_2
|
||||||
|
|
||||||
// we have to override those to avoid virtual function name hiding
|
// we have to override those to avoid virtual function name hiding
|
||||||
wxString GetLabel() const { return wxControl::GetLabel(); }
|
virtual wxString GetLabel() const { return wxControl::GetLabel(); }
|
||||||
void SetLabel( const wxString& label );
|
virtual void SetLabel( const wxString& label );
|
||||||
bool Show( bool show );
|
virtual bool Show( bool show = TRUE );
|
||||||
bool Enable( bool enable );
|
virtual bool Enable( bool enable = TRUE );
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
// --------------
|
// --------------
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: radiobut.h
|
// Name: wx/gtk/radiobut.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
// Copyright: (c) 1998 Robert Roebling
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ public:
|
|||||||
virtual void SetLabel(const wxString& label);
|
virtual void SetLabel(const wxString& label);
|
||||||
virtual void SetValue(bool val);
|
virtual void SetValue(bool val);
|
||||||
virtual bool GetValue() const;
|
virtual bool GetValue() const;
|
||||||
virtual bool Enable( bool enable );
|
virtual bool Enable( bool enable = TRUE );
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: textctrl.h
|
// Name: wx/gtk/textctrl.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Created: 01/02/97
|
||||||
@@ -15,12 +15,6 @@
|
|||||||
#pragma interface "textctrl.h"
|
#pragma interface "textctrl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// classes
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
class wxTextCtrl;
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxTextCtrl
|
// wxTextCtrl
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -114,7 +108,7 @@ public:
|
|||||||
virtual void SetSelection(long from, long to);
|
virtual void SetSelection(long from, long to);
|
||||||
virtual void SetEditable(bool editable);
|
virtual void SetEditable(bool editable);
|
||||||
|
|
||||||
virtual bool Enable( bool enable );
|
virtual bool Enable( bool enable = TRUE );
|
||||||
|
|
||||||
// Implementation from now on
|
// Implementation from now on
|
||||||
void OnDropFiles( wxDropFilesEvent &event );
|
void OnDropFiles( wxDropFilesEvent &event );
|
||||||
|
@@ -58,10 +58,10 @@ public:
|
|||||||
virtual int GetRowCount() const ;
|
virtual int GetRowCount() const ;
|
||||||
|
|
||||||
|
|
||||||
bool Enable(bool enable);
|
virtual bool Enable(bool enable = TRUE);
|
||||||
wxString GetLabel() const;
|
virtual wxString GetLabel() const;
|
||||||
void SetLabel(const wxString& label) ;
|
virtual void SetLabel(const wxString& label) ;
|
||||||
bool Show(bool show);
|
virtual bool Show(bool show = TRUE);
|
||||||
|
|
||||||
// Other external functions
|
// Other external functions
|
||||||
void Command(wxCommandEvent& event);
|
void Command(wxCommandEvent& event);
|
||||||
|
@@ -26,10 +26,10 @@ 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();
|
||||||
|
|
||||||
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,
|
||||||
@@ -38,37 +38,37 @@ public:
|
|||||||
{
|
{
|
||||||
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 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(); };
|
||||||
bool Enable(bool enable);
|
virtual bool Enable(bool enable = TRUE);
|
||||||
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) ;
|
virtual bool Show(bool show = TRUE) ;
|
||||||
|
|
||||||
virtual wxString GetStringSelection() const;
|
virtual wxString GetStringSelection() const;
|
||||||
virtual bool SetStringSelection(const wxString& s);
|
virtual bool SetStringSelection(const wxString& s);
|
||||||
virtual int GetCount() const { return m_noItems; } ;
|
virtual int GetCount() const { return m_noItems; } ;
|
||||||
void Command(wxCommandEvent& event);
|
void Command(wxCommandEvent& event);
|
||||||
|
|
||||||
int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
|
int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
|
||||||
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||||
virtual void ChangeBackgroundColour();
|
virtual void ChangeBackgroundColour();
|
||||||
@@ -78,19 +78,19 @@ public:
|
|||||||
WXWidget GetFrameWidget() const { return m_frameWidget; }
|
WXWidget GetFrameWidget() const { return m_frameWidget; }
|
||||||
inline WXWidget* GetRadioButtons() const { return m_radioButtons; }
|
inline WXWidget* GetRadioButtons() const { return m_radioButtons; }
|
||||||
inline void SetSel(int i) { m_selectedButton = i; }
|
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,
|
virtual void DoSetSize(int x, int y,
|
||||||
int width, int height,
|
int width, int height,
|
||||||
int sizeFlags = wxSIZE_AUTO);
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
|
@@ -66,9 +66,9 @@ public:
|
|||||||
virtual int GetColumnCount() const;
|
virtual int GetColumnCount() const;
|
||||||
virtual int GetRowCount() const;
|
virtual int GetRowCount() const;
|
||||||
|
|
||||||
bool Show(bool show);
|
virtual bool Show(bool show = TRUE);
|
||||||
void SetFocus();
|
void SetFocus();
|
||||||
bool Enable(bool enable);
|
virtual bool Enable(bool enable = TRUE);
|
||||||
void SetLabelFont(const wxFont& WXUNUSED(font)) {};
|
void SetLabelFont(const wxFont& WXUNUSED(font)) {};
|
||||||
void SetButtonFont(const wxFont& font) { SetFont(font); }
|
void SetButtonFont(const wxFont& font) { SetFont(font); }
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: textctrl.h
|
// Name: wx/x11/textctrl.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Created: 01/02/97
|
||||||
@@ -43,9 +43,9 @@ class wxSourceUndoStep: public wxObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxSourceUndoStep( wxSourceUndo type, int y1, int y2, wxTextCtrl *owner );
|
wxSourceUndoStep( wxSourceUndo type, int y1, int y2, wxTextCtrl *owner );
|
||||||
|
|
||||||
void Undo();
|
void Undo();
|
||||||
|
|
||||||
wxSourceUndo m_type;
|
wxSourceUndo m_type;
|
||||||
int m_y1;
|
int m_y1;
|
||||||
int m_y2;
|
int m_y2;
|
||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
{
|
{
|
||||||
m_text = text;
|
m_text = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString m_text;
|
wxString m_text;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -102,12 +102,12 @@ public:
|
|||||||
long style = 0,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString &name = wxTextCtrlNameStr);
|
const wxString &name = wxTextCtrlNameStr);
|
||||||
|
|
||||||
// required for scrolling with wxScrollHelper
|
// required for scrolling with wxScrollHelper
|
||||||
// ------------------------------------------
|
// ------------------------------------------
|
||||||
|
|
||||||
virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); }
|
virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); }
|
||||||
|
|
||||||
// implement base class pure virtuals
|
// implement base class pure virtuals
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
|
|
||||||
@@ -123,11 +123,11 @@ public:
|
|||||||
|
|
||||||
// more readable flag testing methods
|
// more readable flag testing methods
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
|
|
||||||
bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); }
|
bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); }
|
||||||
bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; }
|
bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; }
|
||||||
bool WrapLines() const { return FALSE; }
|
bool WrapLines() const { return FALSE; }
|
||||||
|
|
||||||
// If the return values from and to are the same, there is no selection.
|
// If the return values from and to are the same, there is no selection.
|
||||||
virtual void GetSelection(long* from, long* to) const;
|
virtual void GetSelection(long* from, long* to) const;
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ public:
|
|||||||
virtual void SetSelection(long from, long to);
|
virtual void SetSelection(long from, long to);
|
||||||
virtual void SetEditable(bool editable);
|
virtual void SetEditable(bool editable);
|
||||||
|
|
||||||
virtual bool Enable( bool enable );
|
virtual bool Enable( bool enable = TRUE );
|
||||||
|
|
||||||
void OnCut(wxCommandEvent& event);
|
void OnCut(wxCommandEvent& event);
|
||||||
void OnCopy(wxCommandEvent& event);
|
void OnCopy(wxCommandEvent& event);
|
||||||
@@ -210,36 +210,36 @@ public:
|
|||||||
virtual bool ScrollPages(int pages);
|
virtual bool ScrollPages(int pages);
|
||||||
|
|
||||||
// not part of the wxTextCtrl API from now on..
|
// not part of the wxTextCtrl API from now on..
|
||||||
|
|
||||||
void SetLanguage( wxSourceLanguage lang = wxSOURCE_LANG_NONE );
|
void SetLanguage( wxSourceLanguage lang = wxSOURCE_LANG_NONE );
|
||||||
|
|
||||||
void Delete();
|
void Delete();
|
||||||
void DeleteLine();
|
void DeleteLine();
|
||||||
|
|
||||||
void Indent();
|
void Indent();
|
||||||
void Unindent();
|
void Unindent();
|
||||||
|
|
||||||
bool HasSelection();
|
bool HasSelection();
|
||||||
void ClearSelection();
|
void ClearSelection();
|
||||||
|
|
||||||
int GetCursorX() { return m_cursorX; }
|
int GetCursorX() { return m_cursorX; }
|
||||||
int GetCursorY() { return m_cursorY; }
|
int GetCursorY() { return m_cursorY; }
|
||||||
bool IsModified() { return m_modified; }
|
bool IsModified() { return m_modified; }
|
||||||
bool OverwriteMode() { return m_overwrite; }
|
bool OverwriteMode() { return m_overwrite; }
|
||||||
|
|
||||||
// implementation from now on...
|
// implementation from now on...
|
||||||
|
|
||||||
int PosToPixel( int line, int pos );
|
int PosToPixel( int line, int pos );
|
||||||
int PixelToPos( int line, int pixel );
|
int PixelToPos( int line, int pixel );
|
||||||
|
|
||||||
void SearchForBrackets();
|
void SearchForBrackets();
|
||||||
|
|
||||||
void DoChar( char c );
|
void DoChar( char c );
|
||||||
void DoBack();
|
void DoBack();
|
||||||
void DoDelete();
|
void DoDelete();
|
||||||
void DoReturn();
|
void DoReturn();
|
||||||
void DoDClick();
|
void DoDClick();
|
||||||
|
|
||||||
wxString GetNextToken( wxString &line, size_t &pos );
|
wxString GetNextToken( wxString &line, size_t &pos );
|
||||||
|
|
||||||
void DrawLinePart( wxDC &dc, int x, int y, const wxString &toDraw, const wxString &origin, const wxColour &colour);
|
void DrawLinePart( wxDC &dc, int x, int y, const wxString &toDraw, const wxString &origin, const wxColour &colour);
|
||||||
@@ -251,12 +251,12 @@ public:
|
|||||||
void OnIdle( wxIdleEvent &event );
|
void OnIdle( wxIdleEvent &event );
|
||||||
void OnSetFocus( wxFocusEvent& event );
|
void OnSetFocus( wxFocusEvent& event );
|
||||||
void OnKillFocus( wxFocusEvent& event );
|
void OnKillFocus( wxFocusEvent& event );
|
||||||
|
|
||||||
void RefreshLine( int n );
|
void RefreshLine( int n );
|
||||||
void RefreshDown( int n );
|
void RefreshDown( int n );
|
||||||
void MoveCursor( int new_x, int new_y, bool shift = FALSE, bool centre = FALSE );
|
void MoveCursor( int new_x, int new_y, bool shift = FALSE, bool centre = FALSE );
|
||||||
void MyAdjustScrollbars();
|
void MyAdjustScrollbars();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void Init();
|
void Init();
|
||||||
@@ -271,38 +271,38 @@ protected:
|
|||||||
wxColour m_sourceColour;
|
wxColour m_sourceColour;
|
||||||
wxColour m_commentColour;
|
wxColour m_commentColour;
|
||||||
wxColour m_stringColour;
|
wxColour m_stringColour;
|
||||||
|
|
||||||
int m_cursorX;
|
int m_cursorX;
|
||||||
int m_cursorY;
|
int m_cursorY;
|
||||||
|
|
||||||
int m_selStartX,m_selStartY;
|
int m_selStartX,m_selStartY;
|
||||||
int m_selEndX,m_selEndY;
|
int m_selEndX,m_selEndY;
|
||||||
|
|
||||||
int m_lineHeight;
|
int m_lineHeight;
|
||||||
int m_charWidth;
|
int m_charWidth;
|
||||||
|
|
||||||
int m_longestLine;
|
int m_longestLine;
|
||||||
|
|
||||||
bool m_overwrite;
|
bool m_overwrite;
|
||||||
bool m_modified;
|
bool m_modified;
|
||||||
bool m_editable;
|
bool m_editable;
|
||||||
bool m_ignoreInput;
|
bool m_ignoreInput;
|
||||||
|
|
||||||
wxArrayString m_keywords;
|
wxArrayString m_keywords;
|
||||||
wxColour m_keywordColour;
|
wxColour m_keywordColour;
|
||||||
|
|
||||||
wxArrayString m_defines;
|
wxArrayString m_defines;
|
||||||
wxColour m_defineColour;
|
wxColour m_defineColour;
|
||||||
|
|
||||||
wxArrayString m_variables;
|
wxArrayString m_variables;
|
||||||
wxColour m_variableColour;
|
wxColour m_variableColour;
|
||||||
|
|
||||||
wxSourceLanguage m_lang;
|
wxSourceLanguage m_lang;
|
||||||
|
|
||||||
wxList m_undos;
|
wxList m_undos;
|
||||||
|
|
||||||
bool m_capturing;
|
bool m_capturing;
|
||||||
|
|
||||||
int m_bracketX;
|
int m_bracketX;
|
||||||
int m_bracketY;
|
int m_bracketY;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user