cleanup - reformat

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Surovell
2006-01-10 04:10:57 +00:00
parent ffafe6ca89
commit a02d6c7b19

View File

@@ -17,7 +17,7 @@
// instead of the HIView based implementation in 10.3 and upwards, the former // instead of the HIView based implementation in 10.3 and upwards, the former
// has more features (backgrounds etc.) but may show redraw artefacts and other // has more features (backgrounds etc.) but may show redraw artefacts and other
// problems depending on your usage, default is 'false' // problems depending on your usage, default is 'false'
#define wxMAC_TEXTCONTROL_USE_MLTE _T("mac.textcontrol-use-mlte") #define wxMAC_TEXTCONTROL_USE_MLTE wxT("mac.textcontrol-use-mlte")
#endif #endif
#include "wx/control.h" #include "wx/control.h"
@@ -32,10 +32,7 @@ class WXDLLEXPORT wxTextCtrl: public wxTextCtrlBase
DECLARE_DYNAMIC_CLASS(wxTextCtrl) DECLARE_DYNAMIC_CLASS(wxTextCtrl)
public: public:
// creation
// --------
wxTextCtrl() { Init(); } wxTextCtrl() { Init(); }
~wxTextCtrl();
wxTextCtrl(wxWindow *parent, wxWindowID id, wxTextCtrl(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString, const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@@ -44,10 +41,11 @@ public:
const wxString& name = wxTextCtrlNameStr) const wxString& name = wxTextCtrlNameStr)
{ {
Init(); Init();
Create(parent, id, value, pos, size, style, validator, name); Create(parent, id, value, pos, size, style, validator, name);
} }
~wxTextCtrl();
bool Create(wxWindow *parent, wxWindowID id, bool Create(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString, const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@@ -86,8 +84,8 @@ public:
virtual void MarkDirty(); virtual void MarkDirty();
virtual void DiscardEdits(); virtual void DiscardEdits();
// set the max number of characters which may be entered in a single line // set the max number of characters which may be entered
// text control // in a single line text control
virtual void SetMaxLength(unsigned long len) ; virtual void SetMaxLength(unsigned long len) ;
// text control under some platforms supports the text styles: these // text control under some platforms supports the text styles: these
@@ -97,8 +95,8 @@ public:
virtual bool SetStyle(long start, long end, const wxTextAttr& style); virtual bool SetStyle(long start, long end, const wxTextAttr& style);
virtual bool SetDefaultStyle(const wxTextAttr& style); virtual bool SetDefaultStyle(const wxTextAttr& style);
// writing text inserts it at the current position, appending always // writing text inserts it at the current position;
// inserts it at the end // appending always inserts it at the end
virtual void WriteText(const wxString& text); virtual void WriteText(const wxString& text);
virtual void AppendText(const wxString& text); virtual void AppendText(const wxString& text);
@@ -135,9 +133,6 @@ 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);
// Implementation from now on
// --------------------------
// Implementation // Implementation
// -------------- // --------------
virtual void Command(wxCommandEvent& event); virtual void Command(wxCommandEvent& event);
@@ -168,11 +163,13 @@ public:
void OnContextMenu(wxContextMenuEvent& event); void OnContextMenu(wxContextMenuEvent& event);
virtual bool MacCanFocus() const { return true ; } virtual bool MacCanFocus() const { return true ; }
virtual bool MacSetupCursor( const wxPoint& pt ) ; virtual bool MacSetupCursor( const wxPoint& pt ) ;
virtual void MacVisibilityChanged() ; virtual void MacVisibilityChanged() ;
virtual void MacEnabledStateChanged() ; virtual void MacEnabledStateChanged() ;
virtual void MacSuperChangedPosition() ; virtual void MacSuperChangedPosition() ;
#ifndef __WXMAC_OSX__ #ifndef __WXMAC_OSX__
virtual void MacControlUserPaneDrawProc(wxInt16 part) ; virtual void MacControlUserPaneDrawProc(wxInt16 part) ;
virtual wxInt16 MacControlUserPaneHitTestProc(wxInt16 x, wxInt16 y) ; virtual wxInt16 MacControlUserPaneHitTestProc(wxInt16 x, wxInt16 y) ;
@@ -185,6 +182,7 @@ public:
#endif #endif
wxMacTextControl * GetPeer() const { return (wxMacTextControl*) m_peer; } wxMacTextControl * GetPeer() const { return (wxMacTextControl*) m_peer; }
protected: protected:
// common part of all ctors // common part of all ctors
void Init(); void Init();
@@ -198,6 +196,7 @@ protected:
unsigned long m_maxLength ; unsigned long m_maxLength ;
// need to make this public because of the current implementation via callbacks // need to make this public because of the current implementation via callbacks
private : private :
wxMenu *m_privateContextMenu; wxMenu *m_privateContextMenu;