From f8d5f1e2b48a0b941e1d8d9a435321b44bfcfc1a Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 25 Jul 2002 08:42:04 +0000 Subject: [PATCH] removed virtual modifier from Command handlers, added readonly and color information to textctrls git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/control.h | 6 +++--- include/wx/mac/statbmp.h | 2 +- include/wx/mac/textctrl.h | 11 +++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/include/wx/mac/control.h b/include/wx/mac/control.h index cef07af9c5..ab14b598b3 100644 --- a/include/wx/mac/control.h +++ b/include/wx/mac/control.h @@ -76,9 +76,9 @@ public: virtual bool MacCanFocus() const ; virtual void DoSetSize(int x, int y,int width, int height,int sizeFlags = wxSIZE_AUTO ) ; - virtual void OnKeyDown( wxKeyEvent &event ) ; - virtual void OnMouseEvent( wxMouseEvent &event ) ; - virtual void OnPaint(wxPaintEvent& event) ; + void OnKeyDown( wxKeyEvent &event ) ; + void OnMouseEvent( wxMouseEvent &event ) ; + void OnPaint(wxPaintEvent& event) ; virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL) ; WXWidget GetMacControl() { return m_macControl ;} diff --git a/include/wx/mac/statbmp.h b/include/wx/mac/statbmp.h index 67e92e96e6..f2cbc70730 100644 --- a/include/wx/mac/statbmp.h +++ b/include/wx/mac/statbmp.h @@ -45,7 +45,7 @@ class WXDLLEXPORT wxStaticBitmap: public wxStaticBitmapBase virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; - virtual void OnPaint( wxPaintEvent &event ) ; + void OnPaint( wxPaintEvent &event ) ; wxBitmap GetBitmap() const { return m_bitmap; } wxIcon GetIcon() const diff --git a/include/wx/mac/textctrl.h b/include/wx/mac/textctrl.h index 2327eec3d5..7992658552 100644 --- a/include/wx/mac/textctrl.h +++ b/include/wx/mac/textctrl.h @@ -78,6 +78,16 @@ public: // clears the dirty flag virtual void DiscardEdits(); + // set the max number of characters which may be entered in a single line + // text control + virtual void SetMaxLength(unsigned long len) ; + + // text control under some platforms supports the text styles: these + // methods allow to apply the given text style to the given selection or to + // set/get the style which will be used for all appended text + virtual bool SetStyle(long start, long end, const wxTextAttr& style); + virtual bool SetDefaultStyle(const wxTextAttr& style); + // writing text inserts it at the current position, appending always // inserts it at the end virtual void WriteText(const wxString& text); @@ -155,6 +165,7 @@ protected: void* m_macTXN ; void* m_macTXNvars ; bool m_macUsesTXN ; + unsigned long m_maxLength ; DECLARE_EVENT_TABLE() }; -- 2.45.2