wxWindows is a C++ framework providing GUI (Graphical User
Interface) and other facilities on more than one platform. Version 2.0 currently
-supports MS Windows (16-bit, Windows 95 and Windows NT) and GTK+, with Motif
-and Mac ports in an advanced state.
+supports MS Windows (16-bit, Windows 95 and Windows NT), Unix with GTK+, and Unix with Motif.
+A Mac port is in an advanced state.
wxWindows was originally developed at the Artificial Intelligence
Applications Institute, University of Edinburgh, for internal use.
\item Available on a variety of popular platforms.
\item Works with almost all popular C++ compilers.
\item Several example programs.
-\item Over 700 pages of printable and on-line documentation.
+\item Over 900 pages of printable and on-line documentation.
\item Includes Tex2RTF, to allow you to produce your own documentation
in Windows Help, HTML and Word RTF formats.
\item Simple-to-use, object-oriented API.
\begin{verbatim}
ftp://www.remstar.com/pub/wxwin
- http://web.ukonline.co.uk/julian.smart/wxwin
+ http://www.wxwindows.org
\end{verbatim}
\section{Acknowledgments}
\input statusbr.tex
\input wxstring.tex
\input strlist.tex
+\input tokenizr.tex
\input strmbase.tex
\input stream.tex
-%\input strmmem.tex
+\input strmmem.tex
\input sysclevt.tex
\input settings.tex
\input tab.tex
\input thread.tex
\input time.tex
\input timer.tex
-\input tokenizr.tex
\input toolbar.tex
\input treectrl.tex
\input treeevt.tex
\membersection{wxFrame::OnCreateStatusBar}\label{wxframeoncreatestatusbar}
-\func{virtual wxStatusBar*}{OnCreateStatusBar}{\param{int }{number}
+\func{virtual wxStatusBar*}{OnCreateStatusBar}{\param{int }{number},
\param{long}{ style},
\param{wxWindowID}{ id}, \param{const wxString\&}{ name}}
\wxheading{Include files}
-<wx/help.h>
+<wx/help.h> (wxWindows chooses the appropriate help controller class)\\
+<wx/helpbase.h> (wxHelpControllerBase class)\\
+<wx/helpwin.h> (Windows Help controller)\\
+<wx/generic/helpext.h> (external browser controller)
\latexignore{\rtfignore{\wxheading{Members}}}
-%
-% automatically generated by HelpGen from
-% f:\libs\wxwindows\docs\latex\wx/locale.tex at 15/Feb/99 23:37:46
-%
-
-
\section{\class{wxLocale}}\label{wxlocale}
-wxLocale class encapsulates all language dependent settings and is a
-generalization of the C locale concept (see also setlocale(3)).
+wxLocale class encapsulates all language-dependent settings and is a
+generalization of the C locale concept.
In wxWindows this class manages message catalogs which contain the translations
of the strings used to the current language.
No base class
+\wxheading{Include files}
+
+<wx/intl.h>
+
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxLocale::wxLocale}\label{wxlocaledefctor}
\func{}{wxLocale}{\void}
This is the default constructor and it does nothing to initialize the object:
-\helpref{Init()}{wxlocaleinit} must be used to do it.
-
-\membersection{wxLocale::wxLocale}\label{wxlocalewxlocale}
+\helpref{Init()}{wxlocaleinit} must be used to do that.
\func{}{wxLocale}{\param{const char }{*szName}, \param{const char }{*szShort = NULL}, \param{const char }{*szLocale = NULL}, \param{bool }{bLoadDefault = TRUE}}
\func{}{\destruct{wxLocale}}{\void}
-Destructor, like the constructor, also has global side effects: the previously
+The destructor, like the constructor, also has global side effects: the previously
set locale is restored and so the changes described in
\helpref{Init}{wxlocaleinit} documentation are rolled back.
Returns the locale name as passed to the constructor or
\helpref{Init()}{wxlocaleinit}.
-
\membersection{wxLocale::AddCatalog}\label{wxlocaleaddcatalog}
\func{bool}{AddCatalog}{\param{const char }{*szDomain}}
Add a catalog for use with the current locale: it's searched for in standard
-places (current directory first, system one after), but you may also prepend
+places (current directory first, then the system one), but you may also prepend
additional directories to the search path with
-\helpref{AddCatalogLookupPathPrefix().}{wxlocaleaddcataloglookuppathprefix}.
+\helpref{AddCatalogLookupPathPrefix()}{wxlocaleaddcataloglookuppathprefix}.
All loaded catalogs will be used for message lookup by GetString() for the
current locale.
\func{bool}{Init}{\param{const char }{*szName}, \param{const char }{*szShort = NULL}, \param{const char }{*szLocale = NULL}, \param{bool }{bLoadDefault = TRUE}}
The parameters have the following meaning:
+
\begin{itemize}\itemsep=0pt
\item szName is the name of the locale and is only used in diagnostic messages
\item szShort is the standard 2 letter locale abbreviation and is used as the
\membersection{wxLocale::IsLoaded}\label{wxlocaleisloaded}
-\constfunc{bool}{IsLoaded}{\param{const char }{*szDomain}}
+\constfunc{bool}{IsLoaded}{\param{const char* }{domain}}
+
+Check if the given catalog is loaded, and returns TRUE if it is.
-Check if the given catalog (according to GNU gettext tradition each catalog
-normally corresponds to 'domain' which is more or less the application name)
-is loaded, returns TRUE if it is.
+According to GNU gettext tradition, each catalog
+normally corresponds to 'domain' which is more or less the application name.
See also: \helpref{AddCatalog}{wxlocaleaddcatalog}
\constfunc{const char*}{GetString}{\param{const char }{*szOrigString}, \param{const char }{*szDomain = NULL}}
-Retrieve the translation for a string in all loaded domains unless the szDomain
+Retrieves the translation for a string in all loaded domains unless the szDomain
parameter is specified (and then only this catalog/domain is searched).
Returns original string if translation is not available
(in this case an error message is generated the first time
a string is not found; use \helpref{wxLogNull}{wxlogoverview} to suppress it).
-Remark: domains are searched in the last to first order, i.e. catalogs
+\wxheading{Remarks}
+
+Domains are searched in the last to first order, i.e. catalogs
added later override those added before.
+
\docparam{colour}{Colour object.}
-\docparam{colourName}{Colour name, which should be in the colour database.}
+\docparam{colourName}{Colour name, which should be in the \helpref{colour database}{wxcolourdatabase}.}
+
+\docparam{width}{Width of pen.}
\docparam{style}{Pen style. See \helpref{wxPen::wxPen}{wxpenconstr} for a list of styles.}
\membersection{wxStringTokenizer::wxStringTokenizer}\label{wxstringtokenizerwxstringtokenizer}
+\func{}{wxStringTokenizer}{\void}
+
+Default constructor.
+
\func{}{wxStringTokenizer}{\param{const wxString\& }{to\_tokenize}, \param{const wxString\& }{delims = " $\backslash$t$\backslash$r$\backslash$n"}, \param{bool }{ret\_delim = FALSE}}
-Constructor. Pass the string to tokenze, a string containing delimiters,
+Constructor. Pass the string to tokenize, a string containing delimiters,
a flag specifying whether delimiters are retained.
\membersection{wxStringTokenizer::\destruct{wxStringTokenizer}}\label{wxstringtokenizerdtor}
Returns the input string.
+\membersection{wxStringTokenizer::SetString}\label{wxstringtokenizersetstring}
+
+\func{void}{SetString}{\param{const wxString\& }{to\_tokenize}, \param{const wxString\& }{delims = " $\backslash$t$\backslash$r$\backslash$n"}, \param{bool }{ret\_delim = FALSE}}
+Initializes the tokenizer.
+
+Pass the string to tokenize, a string containing delimiters,
+a flag specifying whether delimiters are retained.
\membersection{wxView::wxView}
-\func{}{wxView}{\param{wxDocument* }{doc = NULL}}
+\func{}{wxView}{\void}
Constructor. Define your own default constructor to initialize application-specific
data.
\helpref{wxWindow::Refresh}{wxwindowrefresh},\rtfsp
\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground}
+\membersection{wxWindow::SetClientSize}\label{wxwindowsetclientsize}
+
+\func{virtual void}{SetClientSize}{\param{int}{ width}, \param{int}{ height}}
+
+\func{virtual void}{SetClientSize}{\param{const wxSize\&}{ size}}
+
+This sets the size of the window client area in pixels. Using this function to size a window
+tends to be more device-independent than \helpref{wxWindow::SetSize}{wxwindowsetsize}, since the application need not
+worry about what dimensions the border or title bar have when trying to fit the window
+around panel items, for example.
+
+\wxheading{Parameters}
+
+\docparam{width}{The required client area width.}
+
+\docparam{height}{The required client area height.}
+
+\docparam{size}{The required client size.}
+
+\membersection{wxWindow::SetCursor}\label{wxwindowsetcursor}
+
+\func{virtual void}{SetCursor}{\param{const wxCursor\&}{cursor}}
+
+Sets the window's cursor.
+
+\wxheading{Parameters}
+
+\docparam{cursor}{Specifies the cursor that the window should normally display.}
+
+\wxheading{Remarks}
+
+Under Windows, you sometimes need to call ::wxSetCursor in addition to this
+function if you want the cursor to change immediately, because under Windows,
+wxWindows only sets the global cursor when it detects mouse movement.
+
+\wxheading{See also}
+
+\helpref{::wxSetCursor}{wxsetcursor}, \helpref{wxCursor}{wxcursor}
+
+\membersection{wxWindow::SetEventHandler}\label{wxwindowseteventhandler}
+
+\func{void}{SetEventHandler}{\param{wxEvtHandler* }{handler}}
+
+Sets the event handler for this window.
+
+\wxheading{Parameters}
+
+\docparam{handler}{Specifies the handler to be set.}
+
+\wxheading{Remarks}
+
+An event handler is an object that is capable of processing the events
+sent to a window. By default, the window is its own event handler, but
+an application may wish to substitute another, for example to allow
+central implementation of event-handling for a variety of different
+window classes.
+
+It is usually better to use \helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler} since
+this sets up a chain of event handlers, where an event not handled by one event handler is
+handed to the next one in the chain.
+
+\wxheading{See also}
+
+\helpref{wxWindow::GetEventHandler}{wxwindowgeteventhandler},\rtfsp
+\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
+\helpref{wxWindow::PopEventHandler}{wxwindowpusheventhandler},\rtfsp
+\helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent},\rtfsp
+\helpref{wxEvtHandler}{wxevthandler}
+
\membersection{wxWindow::SetConstraints}\label{wxwindowsetconstraints}
\func{void}{SetConstraints}{\param{wxLayoutConstraints* }{constraints}}
\helpref{wxWindow::GetName}{wxwindowgetname}
+\membersection{wxWindow::SetPalette}\label{wxwindowsetpalette}
+
+\func{virtual void}{SetPalette}{\param{wxPalette* }{palette}}
+
+Obsolete - use \helpref{wxDC::SetPalette}{wxdcsetpalette} instead.
+
\membersection{wxWindow::SetReturnCode}\label{wxwindowsetreturncode}
\func{void}{SetReturnCode}{\param{int }{retCode}}
The resizing increments are only significant under Motif or Xt.
-\membersection{wxWindow::SetClientSize}
-
-\func{virtual void}{SetClientSize}{\param{int}{ width}, \param{int}{ height}}
-
-\func{virtual void}{SetClientSize}{\param{const wxSize\&}{ size}}
-
-This sets the size of the window client area in pixels. Using this function to size a window
-tends to be more device-independent than \helpref{wxWindow::SetSize}{wxwindowsetsize}, since the application need not
-worry about what dimensions the border or title bar have when trying to fit the window
-around panel items, for example.
-
-\wxheading{Parameters}
-
-\docparam{width}{The required client area width.}
-
-\docparam{height}{The required client area height.}
-
-\docparam{size}{The required client size.}
-
-\membersection{wxWindow::SetPalette}
-
-\func{virtual void}{SetPalette}{\param{wxPalette* }{palette}}
-
-Obsolete - use \helpref{wxDC::SetPalette}{wxdcsetpalette} instead.
-
-\membersection{wxWindow::SetCursor}\label{wxwindowsetcursor}
-
-\func{virtual void}{SetCursor}{\param{const wxCursor\&}{cursor}}
-
-Sets the window's cursor.
-
-\wxheading{Parameters}
-
-\docparam{cursor}{Specifies the cursor that the window should normally display.}
-
-\wxheading{Remarks}
-
-Under Windows, you sometimes need to call ::wxSetCursor in addition to this
-function if you want the cursor to change immediately, because under Windows,
-wxWindows only sets the global cursor when it detects mouse movement.
-
-\wxheading{See also}
-
-\helpref{::wxSetCursor}{wxsetcursor}, \helpref{wxCursor}{wxcursor}
-
-\membersection{wxWindow::SetEventHandler}\label{wxwindowseteventhandler}
-
-\func{void}{SetEventHandler}{\param{wxEvtHandler* }{handler}}
-
-Sets the event handler for this window.
-
-\wxheading{Parameters}
-
-\docparam{handler}{Specifies the handler to be set.}
-
-\wxheading{Remarks}
-
-An event handler is an object that is capable of processing the events
-sent to a window. By default, the window is its own event handler, but
-an application may wish to substitute another, for example to allow
-central implementation of event-handling for a variety of different
-window classes.
-
-It is usually better to use \helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler} since
-this sets up a chain of event handlers, where an event not handled by one event handler is
-handed to the next one in the chain.
-
-\wxheading{See also}
-
-\helpref{wxWindow::GetEventHandler}{wxwindowgeteventhandler},\rtfsp
-\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
-\helpref{wxWindow::PopEventHandler}{wxwindowpusheventhandler},\rtfsp
-\helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent},\rtfsp
-\helpref{wxEvtHandler}{wxevthandler}
-
\membersection{wxWindow::SetTitle}\label{wxwindowsettitle}
\func{virtual void}{SetTitle}{\param{const wxString\& }{title}}
{
DECLARE_ABSTRACT_CLASS(wxView)
public:
- wxView(wxDocument *doc = (wxDocument *) NULL);
+// wxView(wxDocument *doc = (wxDocument *) NULL);
+ wxView();
~wxView(void);
inline wxDocument *GetDocument(void) const { return m_viewDocument; }
// EVT_COMMAND
#define EVT_COMMAND(id, event, fn) { event, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
-#define EVT_COMMAND_RANGE(id1, id2, event, fn) { eventId, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
+#define EVT_COMMAND_RANGE(id1, id2, event, fn) { event, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
// Scrolling
#define EVT_SCROLL(func) \
wxPoint GetPosition() const { return wxWindow::GetPosition(); }
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+ virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+ { wxWindow::SetSize(rect, sizeFlags); }
+ virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+ virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
virtual void ClientToScreen(int *x, int *y) const;
#endif
+#if defined(__WXMSW__) && defined(__BORLANDC__)
+#undef wxUSE_ODBC
+#define wxUSE_ODBC 0
+#endif
+
#if defined(__WXMSW__) && !defined(__WIN32__)
#undef wxUSE_THREADS
void UpdateWindowUI();
void OnEraseBackground(wxEraseEvent& event);
+ void OnKeyDown(wxKeyEvent& event);
+ void OnKeyUp(wxKeyEvent& event);
+ void OnPaint(wxPaintEvent& event);
void OnChar(wxKeyEvent& event);
void OnIdle(wxIdleEvent& event);
const wxString& shortHelpString = "", const wxString& longHelpString = "",
GtkWidget *item = (GtkWidget *) NULL );
#else
- wxToolBarTool(int theIndex = 0, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap,
+ wxToolBarTool(int theIndex, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap,
bool toggle = FALSE, long xPos = -1, long yPos = -1,
const wxString& shortHelpString = wxEmptyString, const wxString& longHelpString = wxEmptyString);
#endif
#include "wx/string.h"
#include "wx/filefn.h"
-class wxStringTokenizer : wxObject {
+class wxStringTokenizer : public wxObject {
public:
wxStringTokenizer(const wxString& to_tokenize,
const wxString& delims = " \t\r\n",
bool ret_delim = FALSE);
+ wxStringTokenizer() { m_string = ""; m_delims = ""; m_retdelims = FALSE;}
~wxStringTokenizer();
int CountTokens();
bool HasMoreToken();
wxString NextToken();
wxString GetString() { return m_string; }
+
+ void SetString(const wxString& to_tokenize,
+ const wxString& delims = " \t\r\n",
+ bool ret_delim = FALSE)
+ {
+ m_string = to_tokenize;
+ m_delims = delims;
+ m_retdelims = ret_delim;
+ }
+
protected:
off_t FindDelims(const wxString& str, const wxString& delims);
protected:
wxFrame *frame;
MyTextWindow *textsw;
- TextEditView(wxDocument *doc = (wxDocument *) NULL): wxView(doc) { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; }
+ TextEditView(): wxView() { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; }
~TextEditView(void) {}
bool OnCreate(wxDocument *doc, long flags);
wxFrame *frame;
MyTextWindow *textsw;
- TextEditView(wxDocument *doc = (wxDocument *) NULL): wxView(doc) { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; }
+ TextEditView(): wxView() { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; }
~TextEditView(void) {}
bool OnCreate(wxDocument *doc, long flags);
* Document view
*/
-wxView::wxView(wxDocument *doc)
+wxView::wxView()
{
- SetDocument(doc);
+// SetDocument(doc);
+ m_viewDocument = (wxDocument*) NULL;
m_viewTypeName = "";
m_viewFrame = (wxFrame *) NULL;
case '\\':
{
char c = (char)event.KeyCode();
- *this << c;
+ WriteText(c);
}
break;
(void) MSWDefWindowProc(m_lastMsg, (WPARAM) id, m_lastLParam);
}
+void wxWindow::OnKeyDown(wxKeyEvent& event)
+{
+ Default();
+}
+
+void wxWindow::OnKeyUp(wxKeyEvent& event)
+{
+ Default();
+}
+
+void wxWindow::OnPaint(wxPaintEvent& event)
+{
+ Default();
+}
+
bool wxWindow::IsEnabled(void) const
{
return (::IsWindowEnabled((HWND) GetHWND()) != 0);