Some doc corrections; removed wxDocument arg from wxView constructor;

wxTextCtrl::OnChar correction; added SetString and default constructor
to wxStringTokenizer; added missing MSW wxFrame::SetSize functions


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 1999-02-16 20:17:02 +00:00
parent e27ce4e910
commit dbdb39b2d0
21 changed files with 172 additions and 116 deletions

View File

@ -7,8 +7,8 @@
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.
@ -80,7 +80,7 @@ here are some of the benefits:
\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.
@ -194,7 +194,7 @@ Applications Institute by anonymous FTP and World Wide Web:
\begin{verbatim}
ftp://www.remstar.com/pub/wxwin
http://web.ukonline.co.uk/julian.smart/wxwin
http://www.wxwindows.org
\end{verbatim}
\section{Acknowledgments}

View File

@ -190,9 +190,10 @@ $$\image{14cm;0cm}{wxclass.ps}$$
\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
@ -212,7 +213,6 @@ $$\image{14cm;0cm}{wxclass.ps}$$
\input thread.tex
\input time.tex
\input timer.tex
\input tokenizr.tex
\input toolbar.tex
\input treectrl.tex
\input treeevt.tex

View File

@ -303,7 +303,7 @@ only). See also \helpref{wxActivateEvent}{wxactivateevent}.
\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}}

View File

@ -32,7 +32,10 @@ wxHelpControllerBase\\
\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}}}

View File

@ -1,13 +1,7 @@
%
% 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.
@ -16,6 +10,10 @@ 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}
@ -23,9 +21,7 @@ No base class
\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}}
@ -51,7 +47,7 @@ translate the messages using the message catalogs for this locale.
\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.
@ -62,15 +58,14 @@ set locale is restored and so the changes described in
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.
@ -93,6 +88,7 @@ This only applies to subsequent invocations of AddCatalog()!
\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
@ -114,11 +110,12 @@ Returns TRUE on success or FALSE if the given locale couldn't be set.
\membersection{wxLocale::IsLoaded}\label{wxlocaleisloaded}
\constfunc{bool}{IsLoaded}{\param{const char }{*szDomain}}
\constfunc{bool}{IsLoaded}{\param{const char* }{domain}}
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.
Check if the given catalog is loaded, and 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}
@ -133,12 +130,15 @@ the Init() function).
\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.

View File

@ -376,7 +376,9 @@ to the pen list, and returns it.
\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.}

View File

@ -14,9 +14,13 @@ wxStringTokenizer helps you to break a string up into a number of tokens.
\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}
@ -49,5 +53,12 @@ Returns the next token.
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.

View File

@ -43,7 +43,7 @@ variable when the view is created. Not currently used by the framework.
\membersection{wxView::wxView}
\func{}{wxView}{\param{wxDocument* }{doc = NULL}}
\func{}{wxView}{\void}
Constructor. Define your own default constructor to initialize application-specific
data.

View File

@ -1551,6 +1551,75 @@ calling this function.
\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}}
@ -1657,6 +1726,12 @@ Sets the window's name.
\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}}
@ -1913,81 +1988,6 @@ given bounds.
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}}

View File

@ -157,7 +157,8 @@ class WXDLLEXPORT wxView: public wxEvtHandler
{
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; }

View File

@ -1305,7 +1305,7 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
// 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) \

View File

@ -69,6 +69,10 @@ public:
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;

View File

@ -282,6 +282,11 @@
#endif
#if defined(__WXMSW__) && defined(__BORLANDC__)
#undef wxUSE_ODBC
#define wxUSE_ODBC 0
#endif
#if defined(__WXMSW__) && !defined(__WIN32__)
#undef wxUSE_THREADS

View File

@ -466,6 +466,9 @@ public:
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);

View File

@ -46,7 +46,7 @@ class WXDLLEXPORT wxToolBarTool: public wxObject
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

View File

@ -20,17 +20,28 @@
#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:

View File

@ -67,7 +67,7 @@ class TextEditView: public wxView
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);

View File

@ -67,7 +67,7 @@ class TextEditView: public wxView
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);

View File

@ -462,9 +462,10 @@ void wxDocument::SetFilename(const wxString& filename, bool notifyViews)
* Document view
*/
wxView::wxView(wxDocument *doc)
wxView::wxView()
{
SetDocument(doc);
// SetDocument(doc);
m_viewDocument = (wxDocument*) NULL;
m_viewTypeName = "";
m_viewFrame = (wxFrame *) NULL;

View File

@ -965,7 +965,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
case '\\':
{
char c = (char)event.KeyCode();
*this << c;
WriteText(c);
}
break;

View File

@ -3715,6 +3715,21 @@ void wxWindow::OnChar(wxKeyEvent& event)
(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);