/////////////////////////////////////////////////////////////////////////////
-// Name: button.h
+// Name: wx/gtk/button.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKBUTTONH__
{
public:
wxButton();
- inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
+ wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
{
Create(parent, id, label, pos, size, style, validator, name);
}
- ~wxButton();
+ virtual ~wxButton();
+
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
+
virtual void SetDefault();
- void SetLabel( const wxString &label );
- bool Enable( bool enable );
+ virtual void SetLabel( const wxString &label );
+ virtual bool Enable( bool enable = TRUE );
static wxSize GetDefaultSize();
-
+
// implementation
// --------------
-
- void ApplyWidgetStyle();
-
+
+ void ApplyWidgetStyle();
+
protected:
virtual wxSize DoGetBestSize() const;
/////////////////////////////////////////////////////////////////////////////
-// Name: checkbox.h
+// Name: wx/gtk/checkbox.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
void SetValue( bool state );
bool GetValue() const;
- void SetLabel( const wxString& label );
- bool Enable( bool enable );
+ virtual void SetLabel( const wxString& label );
+ virtual bool Enable( bool enable = TRUE );
// implementation
// --------------
GtkWidget *m_widgetCheckbox;
GtkWidget *m_widgetLabel;
-
+
bool m_blockEvent;
protected:
/////////////////////////////////////////////////////////////////////////////
-// Name: radiobox.h
+// Name: wx/gtk/radiobox.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
}
- ~wxRadioBox();
+ virtual ~wxRadioBox();
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
#endif // WXWIN_COMPATIBILITY_2_2
// we have to override those to avoid virtual function name hiding
- wxString GetLabel() const { return wxControl::GetLabel(); }
- void SetLabel( const wxString& label );
- bool Show( bool show );
- bool Enable( bool enable );
+ virtual wxString GetLabel() const { return wxControl::GetLabel(); }
+ virtual void SetLabel( const wxString& label );
+ virtual bool Show( bool show = TRUE );
+ virtual bool Enable( bool enable = TRUE );
// implementation
// --------------
/////////////////////////////////////////////////////////////////////////////
-// Name: radiobut.h
+// Name: wx/gtk/radiobut.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
virtual void SetLabel(const wxString& label);
virtual void SetValue(bool val);
virtual bool GetValue() const;
- virtual bool Enable( bool enable );
+ virtual bool Enable( bool enable = TRUE );
// implementation
/////////////////////////////////////////////////////////////////////////////
-// Name: textctrl.h
+// Name: wx/gtk/textctrl.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
#pragma interface "textctrl.h"
#endif
-//-----------------------------------------------------------------------------
-// classes
-//-----------------------------------------------------------------------------
-
-class wxTextCtrl;
-
//-----------------------------------------------------------------------------
// wxTextCtrl
//-----------------------------------------------------------------------------
virtual void SetSelection(long from, long to);
virtual void SetEditable(bool editable);
- virtual bool Enable( bool enable );
+ virtual bool Enable( bool enable = TRUE );
// Implementation from now on
void OnDropFiles( wxDropFilesEvent &event );
/////////////////////////////////////////////////////////////////////////////
-// Name: button.h
+// Name: wx/gtk/button.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKBUTTONH__
{
public:
wxButton();
- inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
+ wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
{
Create(parent, id, label, pos, size, style, validator, name);
}
- ~wxButton();
+ virtual ~wxButton();
+
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
+
virtual void SetDefault();
- void SetLabel( const wxString &label );
- bool Enable( bool enable );
+ virtual void SetLabel( const wxString &label );
+ virtual bool Enable( bool enable = TRUE );
static wxSize GetDefaultSize();
-
+
// implementation
// --------------
-
- void ApplyWidgetStyle();
-
+
+ void ApplyWidgetStyle();
+
protected:
virtual wxSize DoGetBestSize() const;
/////////////////////////////////////////////////////////////////////////////
-// Name: checkbox.h
+// Name: wx/gtk/checkbox.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
void SetValue( bool state );
bool GetValue() const;
- void SetLabel( const wxString& label );
- bool Enable( bool enable );
+ virtual void SetLabel( const wxString& label );
+ virtual bool Enable( bool enable = TRUE );
// implementation
// --------------
GtkWidget *m_widgetCheckbox;
GtkWidget *m_widgetLabel;
-
+
bool m_blockEvent;
protected:
/////////////////////////////////////////////////////////////////////////////
-// Name: radiobox.h
+// Name: wx/gtk/radiobox.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
}
- ~wxRadioBox();
+ virtual ~wxRadioBox();
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
#endif // WXWIN_COMPATIBILITY_2_2
// we have to override those to avoid virtual function name hiding
- wxString GetLabel() const { return wxControl::GetLabel(); }
- void SetLabel( const wxString& label );
- bool Show( bool show );
- bool Enable( bool enable );
+ virtual wxString GetLabel() const { return wxControl::GetLabel(); }
+ virtual void SetLabel( const wxString& label );
+ virtual bool Show( bool show = TRUE );
+ virtual bool Enable( bool enable = TRUE );
// implementation
// --------------
/////////////////////////////////////////////////////////////////////////////
-// Name: radiobut.h
+// Name: wx/gtk/radiobut.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
virtual void SetLabel(const wxString& label);
virtual void SetValue(bool val);
virtual bool GetValue() const;
- virtual bool Enable( bool enable );
+ virtual bool Enable( bool enable = TRUE );
// implementation
/////////////////////////////////////////////////////////////////////////////
-// Name: textctrl.h
+// Name: wx/gtk/textctrl.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
#pragma interface "textctrl.h"
#endif
-//-----------------------------------------------------------------------------
-// classes
-//-----------------------------------------------------------------------------
-
-class wxTextCtrl;
-
//-----------------------------------------------------------------------------
// wxTextCtrl
//-----------------------------------------------------------------------------
virtual void SetSelection(long from, long to);
virtual void SetEditable(bool editable);
- virtual bool Enable( bool enable );
+ virtual bool Enable( bool enable = TRUE );
// Implementation from now on
void OnDropFiles( wxDropFilesEvent &event );
virtual int GetRowCount() const ;
- bool Enable(bool enable);
- wxString GetLabel() const;
- void SetLabel(const wxString& label) ;
- bool Show(bool show);
+ virtual bool Enable(bool enable = TRUE);
+ virtual wxString GetLabel() const;
+ virtual void SetLabel(const wxString& label) ;
+ virtual bool Show(bool show = TRUE);
// Other external functions
void Command(wxCommandEvent& event);
class WXDLLEXPORT wxRadioBox : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxRadioBox)
-
+
public:
wxRadioBox();
-
+
wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
{
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
}
-
+
~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);
-
+
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(); };
- bool Enable(bool enable);
+ virtual bool Enable(bool enable = TRUE);
void Enable(int item, bool enable);
void Show(int item, bool show) ;
- bool Show(bool show) ;
-
+ virtual bool Show(bool show = TRUE) ;
+
virtual wxString GetStringSelection() const;
virtual bool SetStringSelection(const wxString& s);
virtual int GetCount() const { return m_noItems; } ;
void Command(wxCommandEvent& event);
-
+
int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
-
+
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
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;
-
+
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);
virtual int GetColumnCount() const;
virtual int GetRowCount() const;
- bool Show(bool show);
+ virtual bool Show(bool show = TRUE);
void SetFocus();
- bool Enable(bool enable);
+ virtual bool Enable(bool enable = TRUE);
void SetLabelFont(const wxFont& WXUNUSED(font)) {};
void SetButtonFont(const wxFont& font) { SetFont(font); }
/////////////////////////////////////////////////////////////////////////////
-// Name: textctrl.h
+// Name: wx/x11/textctrl.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
{
public:
wxSourceUndoStep( wxSourceUndo type, int y1, int y2, wxTextCtrl *owner );
-
+
void Undo();
-
+
wxSourceUndo m_type;
int m_y1;
int m_y2;
{
m_text = text;
}
-
+
wxString m_text;
};
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString &name = wxTextCtrlNameStr);
-
+
// required for scrolling with wxScrollHelper
// ------------------------------------------
virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); }
-
+
// implement base class pure virtuals
// ----------------------------------
// more readable flag testing methods
// ----------------------------------
-
+
bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); }
bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; }
bool WrapLines() const { return FALSE; }
-
+
// If the return values from and to are the same, there is no selection.
virtual void GetSelection(long* from, long* to) const;
virtual void SetSelection(long from, long to);
virtual void SetEditable(bool editable);
- virtual bool Enable( bool enable );
+ virtual bool Enable( bool enable = TRUE );
void OnCut(wxCommandEvent& event);
void OnCopy(wxCommandEvent& event);
virtual bool ScrollPages(int pages);
// not part of the wxTextCtrl API from now on..
-
+
void SetLanguage( wxSourceLanguage lang = wxSOURCE_LANG_NONE );
void Delete();
void DeleteLine();
-
+
void Indent();
void Unindent();
-
+
bool HasSelection();
void ClearSelection();
-
+
int GetCursorX() { return m_cursorX; }
int GetCursorY() { return m_cursorY; }
bool IsModified() { return m_modified; }
bool OverwriteMode() { return m_overwrite; }
// implementation from now on...
-
+
int PosToPixel( int line, int pos );
int PixelToPos( int line, int pixel );
void SearchForBrackets();
-
+
void DoChar( char c );
void DoBack();
void DoDelete();
void DoReturn();
void DoDClick();
-
+
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 OnIdle( wxIdleEvent &event );
void OnSetFocus( wxFocusEvent& event );
void OnKillFocus( wxFocusEvent& event );
-
+
void RefreshLine( int n );
void RefreshDown( int n );
void MoveCursor( int new_x, int new_y, bool shift = FALSE, bool centre = FALSE );
void MyAdjustScrollbars();
-
+
protected:
// common part of all ctors
void Init();
wxColour m_sourceColour;
wxColour m_commentColour;
wxColour m_stringColour;
-
+
int m_cursorX;
int m_cursorY;
-
+
int m_selStartX,m_selStartY;
int m_selEndX,m_selEndY;
-
+
int m_lineHeight;
int m_charWidth;
-
+
int m_longestLine;
-
+
bool m_overwrite;
bool m_modified;
bool m_editable;
bool m_ignoreInput;
-
+
wxArrayString m_keywords;
wxColour m_keywordColour;
-
+
wxArrayString m_defines;
wxColour m_defineColour;
-
+
wxArrayString m_variables;
wxColour m_variableColour;
-
+
wxSourceLanguage m_lang;
-
+
wxList m_undos;
-
+
bool m_capturing;
-
+
int m_bracketX;
int m_bracketY;