]>
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_
17 // ----------------------------------------------------------------------------
19 // ----------------------------------------------------------------------------
21 // this class is used to wrap the text on word boundary: wrapping is done by
22 // calling OnStartLine() and OnOutputLine() functions
26 wxTextWrapper() { m_eol
= false; }
28 // win is used for getting the font, text is the text to wrap, width is the
29 // max line width or -1 to disable wrapping
30 void Wrap(wxWindow
*win
, const wxString
& text
, int widthMax
);
32 // we don't need it, but just to avoid compiler warnings
33 virtual ~wxTextWrapper() { }
37 virtual void OnOutputLine(const wxString
& line
) = 0;
39 // called at the start of every new line (except the very first one)
40 virtual void OnNewLine() { }
43 // call OnOutputLine() and set m_eol to true
44 void DoOutputLine(const wxString
& line
)
51 // this function is a destructive inspector: when it returns true it also
52 // resets the flag to false so calling it again woulnd't return true any
54 bool IsStartOfNewLine()
80 wxMARKUP_ELEMENT_NAME
,
81 wxMARKUP_ELEMENT_VALUE
,
85 // these are the only entities treated in a special way by wxStaticText::SetLabel()
86 // when the wxST_MARKUP style is used; use as:
88 // wxMarkupEntities[wxMARKUP_ELEMENT_NAME][wxMARKUP_ENTITY_GT] == ">"
89 // wxMarkupEntities[wxMARKUP_ELEMENT_VALUE][wxMARKUP_ENTITY_GT] == ">"
91 extern const wxChar
*wxMarkupEntities
[wxMARKUP_ELEMENT_MAX
][wxMARKUP_ENTITY_MAX
];
93 #endif // wxUSE_STATTEXT
95 #endif // _WX_PRIVATE_STATTEXT_H_