]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/private/stattext.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: include/wx/private/stattext.h
3 // Purpose: Internal declarations for dlgcmn.cpp and stattextcmn.cpp
4 // Author: Francesco Montorsi
5 // Created: 2007-01-07 (extracted from dlgcmn.cpp)
7 // Copyright: (c) 1999 Vadim Zeitlin
8 // (c) 2007 wxWidgets team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_PRIVATE_STATTEXT_H_
13 #define _WX_PRIVATE_STATTEXT_H_
15 #include "wx/window.h"
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
23 // this class is used to wrap the text on word boundary: wrapping is done by
24 // calling OnStartLine() and OnOutputLine() functions
28 wxTextWrapper() { m_eol
= false; }
30 // win is used for getting the font, text is the text to wrap, width is the
31 // max line width or -1 to disable wrapping
32 void Wrap(wxWindow
*win
, const wxString
& text
, int widthMax
);
34 // we don't need it, but just to avoid compiler warnings
35 virtual ~wxTextWrapper() { }
39 virtual void OnOutputLine(const wxString
& line
) = 0;
41 // called at the start of every new line (except the very first one)
42 virtual void OnNewLine() { }
45 // call OnOutputLine() and set m_eol to true
46 void DoOutputLine(const wxString
& line
)
53 // this function is a destructive inspector: when it returns true it also
54 // resets the flag to false so calling it again woulnd't return true any
56 bool IsStartOfNewLine()
70 #endif // wxUSE_STATTEXT
84 wxMARKUP_ELEMENT_NAME
,
85 wxMARKUP_ELEMENT_VALUE
,
89 // these are the only entities treated in a special way by wxStaticText::SetLabel()
90 // when the wxST_MARKUP style is used; use as:
92 // wxMarkupEntities[wxMARKUP_ELEMENT_NAME][wxMARKUP_ENTITY_GT] == ">"
93 // wxMarkupEntities[wxMARKUP_ELEMENT_VALUE][wxMARKUP_ENTITY_GT] == ">"
95 extern const wxChar
*wxMarkupEntities
[wxMARKUP_ELEMENT_MAX
][wxMARKUP_ENTITY_MAX
];
97 #endif // _WX_PRIVATE_STATTEXT_H_