it's replaced by it is, 'll by will
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -457,7 +457,7 @@ deleted. If FALSE, the application will continue to run.}
|
|||||||
|
|
||||||
Sets the `top' window. You can call this from within \helpref{wxApp::OnInit}{wxapponinit} to
|
Sets the `top' window. You can call this from within \helpref{wxApp::OnInit}{wxapponinit} to
|
||||||
let wxWindows know which is the main window. You don't have to set the top window;
|
let wxWindows know which is the main window. You don't have to set the top window;
|
||||||
it's only a convenience so that (for example) certain dialogs without parents can use a
|
it is only a convenience so that (for example) certain dialogs without parents can use a
|
||||||
specific window as the top window. If no top window is specified by the application,
|
specific window as the top window. If no top window is specified by the application,
|
||||||
wxWindows just uses the first frame or dialog in its top-level window list, when it
|
wxWindows just uses the first frame or dialog in its top-level window list, when it
|
||||||
needs to use the top window.
|
needs to use the top window.
|
||||||
|
@@ -51,7 +51,7 @@ wxArrayDouble class is scheduled for the next release of wxWindows).
|
|||||||
wxSortedArray is a wxArray variant which should be used when searching in the
|
wxSortedArray is a wxArray variant which should be used when searching in the
|
||||||
array is a frequently used operation. It requires you to define an additional
|
array is a frequently used operation. It requires you to define an additional
|
||||||
function for comparing two elements of the array element type and always stores
|
function for comparing two elements of the array element type and always stores
|
||||||
its items in the sorted order (according to this function). Thus, it's
|
its items in the sorted order (according to this function). Thus, it is
|
||||||
\helpref{Index()}{wxarrayindex} function execution time is $O(log(N))$ instead of
|
\helpref{Index()}{wxarrayindex} function execution time is $O(log(N))$ instead of
|
||||||
$O(N)$ for the usual arrays but the \helpref{Add()}{wxarrayadd} method is
|
$O(N)$ for the usual arrays but the \helpref{Add()}{wxarrayadd} method is
|
||||||
slower: it is $O(log(N))$ instead of constant time (neglecting time spent in
|
slower: it is $O(log(N))$ instead of constant time (neglecting time spent in
|
||||||
@@ -75,7 +75,7 @@ example:
|
|||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
#include <wx/dynarray.h>
|
#include <wx/dynarray.h>
|
||||||
|
|
||||||
// we must forward declare the array because it's used inside the class
|
// we must forward declare the array because it is used inside the class
|
||||||
// declaration
|
// declaration
|
||||||
class MyDirectory;
|
class MyDirectory;
|
||||||
class MyFile;
|
class MyFile;
|
||||||
|
@@ -692,7 +692,7 @@ it can alert you to problems later on.
|
|||||||
Using wxString can be much safer and more convenient than using char *.
|
Using wxString can be much safer and more convenient than using char *.
|
||||||
Again, I haven't practiced what I'm preaching, but I'm now trying to use
|
Again, I haven't practiced what I'm preaching, but I'm now trying to use
|
||||||
wxString wherever possible. You can reduce the possibility of memory
|
wxString wherever possible. You can reduce the possibility of memory
|
||||||
leaks substantially, and it's much more convenient to use the overloaded
|
leaks substantially, and it is much more convenient to use the overloaded
|
||||||
operators than functions such as strcmp. wxString won't add a significant
|
operators than functions such as strcmp. wxString won't add a significant
|
||||||
overhead to your program; the overhead is compensated for by easier
|
overhead to your program; the overhead is compensated for by easier
|
||||||
manipulation (which means less code).
|
manipulation (which means less code).
|
||||||
@@ -721,7 +721,7 @@ kinds of bitmap depending on platform (see the section on resource files).
|
|||||||
|
|
||||||
\subsection{Positive thinking}
|
\subsection{Positive thinking}
|
||||||
|
|
||||||
It's common to blow up the problem in one's imagination, so that it seems to threaten
|
It is common to blow up the problem in one's imagination, so that it seems to threaten
|
||||||
weeks, months or even years of work. The problem you face may seem insurmountable:
|
weeks, months or even years of work. The problem you face may seem insurmountable:
|
||||||
but almost never is. Once you have been programming for some time, you will be able
|
but almost never is. Once you have been programming for some time, you will be able
|
||||||
to remember similar incidents that threw you into the depths of despair. But
|
to remember similar incidents that threw you into the depths of despair. But
|
||||||
@@ -748,8 +748,8 @@ deallocation, this can still give totally spurious results!
|
|||||||
|
|
||||||
\subsection{Use a debugger}
|
\subsection{Use a debugger}
|
||||||
|
|
||||||
This sounds like facetious advice, but it's surprising how often people
|
This sounds like facetious advice, but it is surprising how often people
|
||||||
don't use a debugger. Often it's an overhead to install or learn how to
|
don't use a debugger. Often it is an overhead to install or learn how to
|
||||||
use a debugger, but it really is essential for anything but the most
|
use a debugger, but it really is essential for anything but the most
|
||||||
trivial programs.
|
trivial programs.
|
||||||
|
|
||||||
@@ -778,13 +778,13 @@ See the \helpref{debugging overview}{debuggingoverview} for further information.
|
|||||||
|
|
||||||
\subsection{Check Windows debug messages}
|
\subsection{Check Windows debug messages}
|
||||||
|
|
||||||
Under Windows, it's worth running your program with
|
Under Windows, it is worth running your program with
|
||||||
\urlref{DbgView}{http://www.sysinternals.com} running or
|
\urlref{DbgView}{http://www.sysinternals.com} running or
|
||||||
some other program that shows Windows-generated debug messages. It's
|
some other program that shows Windows-generated debug messages. It is
|
||||||
possible it'll show invalid handles being used. You may have fun seeing
|
possible it will show invalid handles being used. You may have fun seeing
|
||||||
what commercial programs cause these normally hidden errors! Microsoft
|
what commercial programs cause these normally hidden errors! Microsoft
|
||||||
recommend using the debugging version of Windows, which shows up even
|
recommend using the debugging version of Windows, which shows up even
|
||||||
more problems. However, I doubt it's worth the hassle for most
|
more problems. However, I doubt it is worth the hassle for most
|
||||||
applications. wxWindows is designed to minimize the possibility of such
|
applications. wxWindows is designed to minimize the possibility of such
|
||||||
errors, but they can still happen occasionally, slipping through unnoticed
|
errors, but they can still happen occasionally, slipping through unnoticed
|
||||||
because they are not severe enough to cause a crash.
|
because they are not severe enough to cause a crash.
|
||||||
|
@@ -24,8 +24,8 @@ relative to the sum of all weight factors of the sizer, so when adding two windo
|
|||||||
a value of 1, they will both get resized equally much and each half as much as the sizer
|
a value of 1, they will both get resized equally much and each half as much as the sizer
|
||||||
owning them. Then what do we do when a column sizer changes its width? This behaviour is
|
owning them. Then what do we do when a column sizer changes its width? This behaviour is
|
||||||
controlled by {\it flags} (the second parameter of the Add() function): Zero or no flag
|
controlled by {\it flags} (the second parameter of the Add() function): Zero or no flag
|
||||||
indicates that the window will preserve it's original size, wxGROW flag (same as wxEXPAND)
|
indicates that the window will preserve it is original size, wxGROW flag (same as wxEXPAND)
|
||||||
forces the window to grow with the sizer, and wxSHAPED flag tells the window to change it's
|
forces the window to grow with the sizer, and wxSHAPED flag tells the window to change it is
|
||||||
size proportionally, preserving original aspect ratio. When wxGROW flag is not used,
|
size proportionally, preserving original aspect ratio. When wxGROW flag is not used,
|
||||||
the item can be aligned within available space. wxALIGN\_LEFT, wxALIGN\_TOP, wxALIGN\_RIGHT,
|
the item can be aligned within available space. wxALIGN\_LEFT, wxALIGN\_TOP, wxALIGN\_RIGHT,
|
||||||
wxALIGN\_BOTTOM, wxALIGN\_CENTER\_HORIZONTAL and wxALIGN\_CENTER\_VERTICAL do what they say.
|
wxALIGN\_BOTTOM, wxALIGN\_CENTER\_HORIZONTAL and wxALIGN\_CENTER\_VERTICAL do what they say.
|
||||||
|
@@ -31,7 +31,7 @@ class, so there is no need to create such objects explicitly in an application.
|
|||||||
\func{wxObject*}{CreateObject}{\void}
|
\func{wxObject*}{CreateObject}{\void}
|
||||||
|
|
||||||
Creates an object of the appropriate kind. Returns NULL if the class has not been declared
|
Creates an object of the appropriate kind. Returns NULL if the class has not been declared
|
||||||
dynamically creatable (typically, it's an abstract class).
|
dynamically creatable (typically, it is an abstract class).
|
||||||
|
|
||||||
\membersection{wxClassInfo::FindClass}
|
\membersection{wxClassInfo::FindClass}
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@ objects. They may be used in a multithreaded application to wait until the
|
|||||||
given condition becomes true which happens when the condition becomes signaled.
|
given condition becomes true which happens when the condition becomes signaled.
|
||||||
|
|
||||||
For example, if a worker thread is doing some long task and another thread has
|
For example, if a worker thread is doing some long task and another thread has
|
||||||
to wait until it's finished, the latter thread will wait on the condition
|
to wait until it is finished, the latter thread will wait on the condition
|
||||||
object and the worker thread will signal it on exit (this example is not
|
object and the worker thread will signal it on exit (this example is not
|
||||||
perfect because in this particular case it would be much better to just
|
perfect because in this particular case it would be much better to just
|
||||||
\helpref{Wait()}{wxthreadwait} for the worker thread, but if there are several
|
\helpref{Wait()}{wxthreadwait} for the worker thread, but if there are several
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
\section{\class{wxConfigBase}}\label{wxconfigbase}
|
\section{\class{wxConfigBase}}\label{wxconfigbase}
|
||||||
|
|
||||||
wxConfigBase class defines the basic interface of all config classes. It can
|
wxConfigBase class defines the basic interface of all config classes. It can
|
||||||
not be used by itself (it's an abstract base class) and you'll always use one
|
not be used by itself (it is an abstract base class) and you will always use one
|
||||||
of its derivations: wxIniConfig, wxFileConfig, wxRegConfig or any other.
|
of its derivations: wxIniConfig, wxFileConfig, wxRegConfig or any other.
|
||||||
|
|
||||||
However, usually you don't even need to know the precise nature of the class
|
However, usually you don't even need to know the precise nature of the class
|
||||||
@@ -118,7 +118,7 @@ support a file system-like hierarchy of keys (files) and groups (directories).
|
|||||||
As in the file system case, to specify a key in the config class you must use
|
As in the file system case, to specify a key in the config class you must use
|
||||||
a path to it. Config classes also support the notion of the current group,
|
a path to it. Config classes also support the notion of the current group,
|
||||||
which makes it possible to use the relative paths. To clarify all this, here
|
which makes it possible to use the relative paths. To clarify all this, here
|
||||||
is an example (it's only for the sake of demonstration, it doesn't do anything
|
is an example (it is only for the sake of demonstration, it doesn't do anything
|
||||||
sensible!):
|
sensible!):
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
@@ -139,11 +139,11 @@ sensible!):
|
|||||||
|
|
||||||
wxASSERT( conf->Read("Subgroup/SubgroupEntry", 0l) == 3 );
|
wxASSERT( conf->Read("Subgroup/SubgroupEntry", 0l) == 3 );
|
||||||
|
|
||||||
// use absolute path: it's allowed, too
|
// use absolute path: it is allowed, too
|
||||||
wxASSERT( conf->Read("/RootEntry", 0l) == 1 );
|
wxASSERT( conf->Read("/RootEntry", 0l) == 1 );
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
{\it Warning}: it's probably a good idea to always restore the path to its
|
{\it Warning}: it is probably a good idea to always restore the path to its
|
||||||
old value on function exit:
|
old value on function exit:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
@@ -175,7 +175,7 @@ doesn't save and restore the path):
|
|||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
Finally, the path separator in wxConfigBase and derived classes is always '/',
|
Finally, the path separator in wxConfigBase and derived classes is always '/',
|
||||||
regardless of the platform (i.e. it's {\bf not} '$\backslash\backslash$' under Windows).
|
regardless of the platform (i.e. it is {\bf not} '$\backslash\backslash$' under Windows).
|
||||||
|
|
||||||
\helpref{SetPath}{wxconfigbasesetpath}\\
|
\helpref{SetPath}{wxconfigbasesetpath}\\
|
||||||
\helpref{GetPath}{wxconfigbasegetpath}
|
\helpref{GetPath}{wxconfigbasegetpath}
|
||||||
@@ -186,9 +186,9 @@ The functions in this section allow to enumerate all entries and groups in the
|
|||||||
config file. All functions here return FALSE when there are no more items.
|
config file. All functions here return FALSE when there are no more items.
|
||||||
|
|
||||||
You must pass the same index to GetNext and GetFirst (don't modify it).
|
You must pass the same index to GetNext and GetFirst (don't modify it).
|
||||||
Please note that it's {\bf not} the index of the current item (you will have
|
Please note that it is {\bf not} the index of the current item (you will have
|
||||||
some great surprizes with wxRegConfig if you assume this) and you shouldn't
|
some great surprizes with wxRegConfig if you assume this) and you shouldn't
|
||||||
even look at it: it's just a "cookie" which stores the state of the
|
even look at it: it is just a "cookie" which stores the state of the
|
||||||
enumeration. It can't be stored inside the class because it would prevent you
|
enumeration. It can't be stored inside the class because it would prevent you
|
||||||
from running several enumerations simultaneously, that's why you must pass it
|
from running several enumerations simultaneously, that's why you must pass it
|
||||||
explicitly.
|
explicitly.
|
||||||
@@ -669,8 +669,8 @@ Determine whether we wish to expand environment variables in key values.
|
|||||||
|
|
||||||
\func{void}{SetPath}{\param{const wxString\& }{strPath}}
|
\func{void}{SetPath}{\param{const wxString\& }{strPath}}
|
||||||
|
|
||||||
Set current path: if the first character is '/', it's the absolute path,
|
Set current path: if the first character is '/', it is the absolute path,
|
||||||
otherwise it's a relative path. '..' is supported. If the strPath doesn't
|
otherwise it is a relative path. '..' is supported. If the strPath doesn't
|
||||||
exist it is created.
|
exist it is created.
|
||||||
|
|
||||||
\membersection{wxConfigBase::SetRecordDefaults}\label{wxconfigbasesetrecorddefaults}
|
\membersection{wxConfigBase::SetRecordDefaults}\label{wxconfigbasesetrecorddefaults}
|
||||||
|
@@ -155,7 +155,7 @@ hotSpotY=0)}}{Constructs a cursor from a filename}
|
|||||||
Destroys the cursor. A cursor can be reused for more
|
Destroys the cursor. A cursor can be reused for more
|
||||||
than one window, and does not get destroyed when the window is
|
than one window, and does not get destroyed when the window is
|
||||||
destroyed. wxWindows destroys all cursors on application exit, although
|
destroyed. wxWindows destroys all cursors on application exit, although
|
||||||
it's best to clean them up explicitly.
|
it is best to clean them up explicitly.
|
||||||
|
|
||||||
\membersection{wxCursor::Ok}\label{wxcursorok}
|
\membersection{wxCursor::Ok}\label{wxcursorok}
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ done with it.
|
|||||||
\constfunc{bool}{IsOk}{\void}
|
\constfunc{bool}{IsOk}{\void}
|
||||||
|
|
||||||
Returns {\tt TRUE} if the dialup manager was initialized correctly. If this
|
Returns {\tt TRUE} if the dialup manager was initialized correctly. If this
|
||||||
function returns {\tt FALSE}, no other functions will work neither, so it's a
|
function returns {\tt FALSE}, no other functions will work neither, so it is a
|
||||||
good idea to call this function and check its result before calling any other
|
good idea to call this function and check its result before calling any other
|
||||||
wxDialUpManager methods
|
wxDialUpManager methods
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ Returns {\tt TRUE} if the computer has a permanent network connection (i.e. is
|
|||||||
on a LAN) and so there is no need to use Dial() function to go online.
|
on a LAN) and so there is no need to use Dial() function to go online.
|
||||||
|
|
||||||
{\bf NB:} this functions tries to guess the result and it is not always
|
{\bf NB:} this functions tries to guess the result and it is not always
|
||||||
guaranteed to be correct, so it's better to ask user for
|
guaranteed to be correct, so it is better to ask user for
|
||||||
confirmation or give him a possibility to override it.
|
confirmation or give him a possibility to override it.
|
||||||
|
|
||||||
\membersection{wxDialUpManager::IsOnline}\label{wxdialupmanagerisonline}
|
\membersection{wxDialUpManager::IsOnline}\label{wxdialupmanagerisonline}
|
||||||
@@ -198,7 +198,7 @@ Disable automatic check for connection status change - notice that the
|
|||||||
This method is for Unix only.
|
This method is for Unix only.
|
||||||
|
|
||||||
Under Unix, the value of well-known host is used to check whether we're
|
Under Unix, the value of well-known host is used to check whether we're
|
||||||
connected to the internet. It's unused under Windows, but this function
|
connected to the internet. It is unused under Windows, but this function
|
||||||
is always safe to call. The default value is {\tt www.yahoo.com:80}.
|
is always safe to call. The default value is {\tt www.yahoo.com:80}.
|
||||||
|
|
||||||
\membersection{wxDialUpManager::SetConnectCommand}\label{wxdialupmanagersetconnectcommand}
|
\membersection{wxDialUpManager::SetConnectCommand}\label{wxdialupmanagersetconnectcommand}
|
||||||
|
@@ -41,7 +41,7 @@ These constants define the file access rights and are used with
|
|||||||
\helpref{wxFile::Create}{wxfilecreate} and \helpref{wxFile::Open}{wxfileopen}.
|
\helpref{wxFile::Create}{wxfilecreate} and \helpref{wxFile::Open}{wxfileopen}.
|
||||||
|
|
||||||
The {\it OpenMode} enumeration defines the different modes for opening a file,
|
The {\it OpenMode} enumeration defines the different modes for opening a file,
|
||||||
it's defined inside wxFile class so its members should be specified with {\it wxFile::} scope
|
it is defined inside wxFile class so its members should be specified with {\it wxFile::} scope
|
||||||
resolution prefix. It is also used with \helpref{wxFile::Access}{wxfileaccess} function.
|
resolution prefix. It is also used with \helpref{wxFile::Access}{wxfileaccess} function.
|
||||||
|
|
||||||
\twocolwidtha{7cm}
|
\twocolwidtha{7cm}
|
||||||
|
@@ -13,7 +13,7 @@ will be returned if the corresponding information couldn't be found.
|
|||||||
The objects of this class are never created by the application code but are
|
The objects of this class are never created by the application code but are
|
||||||
returned by \helpref{wxMimeTypesManager::GetFileTypeFromMimeType}{wxmimetypesmanagergetfiletypefrommimetype} and
|
returned by \helpref{wxMimeTypesManager::GetFileTypeFromMimeType}{wxmimetypesmanagergetfiletypefrommimetype} and
|
||||||
\helpref{wxMimeTypesManager::GetFileTypeFromExtension}{wxmimetypesmanagergetfiletypefromextension} methods.
|
\helpref{wxMimeTypesManager::GetFileTypeFromExtension}{wxmimetypesmanagergetfiletypefromextension} methods.
|
||||||
But it's your responsibility to delete the returned pointer when you're done
|
But it is your responsibility to delete the returned pointer when you're done
|
||||||
with it!
|
with it!
|
||||||
|
|
||||||
% TODO describe MIME types better than this...
|
% TODO describe MIME types better than this...
|
||||||
|
@@ -12,7 +12,7 @@ It provides more information than wxWindow's input stream
|
|||||||
{\bf Note:} Any pointer returned by wxFSFile's member is valid
|
{\bf Note:} Any pointer returned by wxFSFile's member is valid
|
||||||
only as long as wxFSFile object exists. For example a call to GetStream()
|
only as long as wxFSFile object exists. For example a call to GetStream()
|
||||||
doesn't {\it create} the stream but only returns the pointer to it. In
|
doesn't {\it create} the stream but only returns the pointer to it. In
|
||||||
other words after 10 calls to GetStream() you'll obtain ten identical
|
other words after 10 calls to GetStream() you will obtain ten identical
|
||||||
pointers.
|
pointers.
|
||||||
|
|
||||||
\wxheading{Derived from}
|
\wxheading{Derived from}
|
||||||
@@ -52,7 +52,7 @@ functions.
|
|||||||
|
|
||||||
\wxheading{Notes}
|
\wxheading{Notes}
|
||||||
|
|
||||||
It is seldom used by the application programmer but you'll need it if
|
It is seldom used by the application programmer but you will need it if
|
||||||
you are writing your own virtual FS. For example you may need something
|
you are writing your own virtual FS. For example you may need something
|
||||||
similar to wxMemoryInputStream, but because wxMemoryInputStream
|
similar to wxMemoryInputStream, but because wxMemoryInputStream
|
||||||
doesn't free the memory when destroyed and thus passing a memory stream
|
doesn't free the memory when destroyed and thus passing a memory stream
|
||||||
|
@@ -2257,7 +2257,7 @@ Example:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// no window has the focus or it's not a text control
|
// no window has the focus or it is not a text control
|
||||||
}
|
}
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
@@ -2337,7 +2337,7 @@ files and loading user interface elements from resources.
|
|||||||
|
|
||||||
\normalbox{Please note that this use of the word `resource' is different from that used when talking
|
\normalbox{Please note that this use of the word `resource' is different from that used when talking
|
||||||
about initialisation file resource reading and writing, using such functions
|
about initialisation file resource reading and writing, using such functions
|
||||||
as wxWriteResource and wxGetResource. It's just an unfortunate clash of terminology.}
|
as wxWriteResource and wxGetResource. It is just an unfortunate clash of terminology.}
|
||||||
|
|
||||||
\helponly{For an overview of the wxWindows resource mechanism, see \helpref{the wxWindows resource system}{resourceformats}.}
|
\helponly{For an overview of the wxWindows resource mechanism, see \helpref{the wxWindows resource system}{resourceformats}.}
|
||||||
|
|
||||||
@@ -2573,7 +2573,7 @@ meaningless.
|
|||||||
|
|
||||||
\func{void}{wxLogVerbose}{\param{const char*}{ formatString}, \param{...}{}}
|
\func{void}{wxLogVerbose}{\param{const char*}{ formatString}, \param{...}{}}
|
||||||
|
|
||||||
For verbose output. Normally, it's suppressed, but
|
For verbose output. Normally, it is suppressed, but
|
||||||
might be activated if the user wishes to know more details about the program
|
might be activated if the user wishes to know more details about the program
|
||||||
progress (another, but possibly confusing name for the same function is {\bf wxLogInfo}).
|
progress (another, but possibly confusing name for the same function is {\bf wxLogInfo}).
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@ This image shows you cells and containers:
|
|||||||
\wxheading{Using Containers in Tag Handler}
|
\wxheading{Using Containers in Tag Handler}
|
||||||
|
|
||||||
\helpref{wxHtmlWinParser}{wxhtmlwinparser} provides a user-friendly way
|
\helpref{wxHtmlWinParser}{wxhtmlwinparser} provides a user-friendly way
|
||||||
of managing containers. It's based on the idea of opening and closing containers.
|
of managing containers. It is based on the idea of opening and closing containers.
|
||||||
|
|
||||||
Use \helpref{OpenContainer}{wxhtmlwinparseropencontainer} to open new
|
Use \helpref{OpenContainer}{wxhtmlwinparseropencontainer} to open new
|
||||||
a container {\it within an already opened container}. This new container is a
|
a container {\it within an already opened container}. This new container is a
|
||||||
@@ -47,7 +47,7 @@ See explanation:
|
|||||||
|
|
||||||
\helponly{\image{}{cont.bmp}}
|
\helponly{\image{}{cont.bmp}}
|
||||||
\end{comment}
|
\end{comment}
|
||||||
It's clear there must be same number of calls to
|
It is clear there must be same number of calls to
|
||||||
OpenContainer as to CloseContainer...
|
OpenContainer as to CloseContainer...
|
||||||
|
|
||||||
\wxheading{Example}
|
\wxheading{Example}
|
||||||
|
@@ -54,7 +54,7 @@ the structure of macros. See macros reference:
|
|||||||
Starts handler definition. {\it name} is handler identifier (in fact
|
Starts handler definition. {\it name} is handler identifier (in fact
|
||||||
part of class name), {\it tags} is string containing list of tags
|
part of class name), {\it tags} is string containing list of tags
|
||||||
supported by this handler (in uppercase). This macro derives new class from
|
supported by this handler (in uppercase). This macro derives new class from
|
||||||
wxHtmlWinTagHandler and implements it's
|
wxHtmlWinTagHandler and implements it is
|
||||||
\helpref{GetSupportedTags}{wxhtmltaghandlergetsupportedtags} method.
|
\helpref{GetSupportedTags}{wxhtmltaghandlergetsupportedtags} method.
|
||||||
|
|
||||||
Example: TAG\_HANDLER\_BEGIN(FONTS, "B,I,U,T")
|
Example: TAG\_HANDLER\_BEGIN(FONTS, "B,I,U,T")
|
||||||
|
@@ -43,7 +43,7 @@ See the example:
|
|||||||
html -> SetRelatedStatusBar(0);
|
html -> SetRelatedStatusBar(0);
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
The first command associates html object with it's parent frame
|
The first command associates html object with it is parent frame
|
||||||
(this points to wxFrame object there) and sets format of title.
|
(this points to wxFrame object there) and sets format of title.
|
||||||
Page title "Hello, world!" will be displayed as "HTML : Hello, world!"
|
Page title "Hello, world!" will be displayed as "HTML : Hello, world!"
|
||||||
in this example.
|
in this example.
|
||||||
|
@@ -103,7 +103,7 @@ This must be called after DoParsing().
|
|||||||
\constfunc{wxFileSystem*}{GetFS}{\void}
|
\constfunc{wxFileSystem*}{GetFS}{\void}
|
||||||
|
|
||||||
Returns pointer to the file system. Because each tag handler has
|
Returns pointer to the file system. Because each tag handler has
|
||||||
reference to it's parent parser it can easily request the file by
|
reference to it is parent parser it can easily request the file by
|
||||||
calling
|
calling
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
|
@@ -22,7 +22,7 @@ wxObject
|
|||||||
|
|
||||||
\func{}{wxHtmlTag}{\param{const wxString\& }{source}, \param{int }{pos}, \param{int }{end\_pos}, \param{wxHtmlTagsCache* }{cache}}
|
\func{}{wxHtmlTag}{\param{const wxString\& }{source}, \param{int }{pos}, \param{int }{end\_pos}, \param{wxHtmlTagsCache* }{cache}}
|
||||||
|
|
||||||
Constructor. You'll probably never have to construct a wxHtmlTag object
|
Constructor. You will probably never have to construct a wxHtmlTag object
|
||||||
yourself. Feel free to ignore the constructor parameters.
|
yourself. Feel free to ignore the constructor parameters.
|
||||||
Have a look at lib/htmlparser.cpp if you're interested in creating it.
|
Have a look at lib/htmlparser.cpp if you're interested in creating it.
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ tag handlers. It is used almost exclusively together with set of
|
|||||||
|
|
||||||
\func{virtual void}{FillHandlersTable}{\param{wxHtmlWinParser }{*parser}}
|
\func{virtual void}{FillHandlersTable}{\param{wxHtmlWinParser }{*parser}}
|
||||||
|
|
||||||
You must override this method. In most common case it's body consists
|
You must override this method. In most common case it is body consists
|
||||||
only of lines of following type:
|
only of lines of following type:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
|
@@ -28,7 +28,7 @@ Constructor.
|
|||||||
|
|
||||||
\wxheading{Parameters}
|
\wxheading{Parameters}
|
||||||
|
|
||||||
\docparam{wnd}{Connected window. It's parent window {\bf must} be the wxHtmlWindow object within
|
\docparam{wnd}{Connected window. It is parent window {\bf must} be the wxHtmlWindow object within
|
||||||
which it is displayed!}
|
which it is displayed!}
|
||||||
|
|
||||||
\docparam{w}{Floating width. If non-zero width of {\it wnd} window is adjusted so that it is
|
\docparam{w}{Floating width. If non-zero width of {\it wnd} window is adjusted so that it is
|
||||||
|
@@ -80,7 +80,7 @@ Returns default horizontal alignment.
|
|||||||
|
|
||||||
\constfunc{int}{GetCharHeight}{\void}
|
\constfunc{int}{GetCharHeight}{\void}
|
||||||
|
|
||||||
Returns (average) char height in standard font. It's used as DC-independent metrics.
|
Returns (average) char height in standard font. It is used as DC-independent metrics.
|
||||||
|
|
||||||
{\bf Note:} This function doesn't return the {\it actual} height. If you want to
|
{\bf Note:} This function doesn't return the {\it actual} height. If you want to
|
||||||
know the height of the current font, call {\tt GetDC -> GetCharHeight()}.
|
know the height of the current font, call {\tt GetDC -> GetCharHeight()}.
|
||||||
@@ -89,7 +89,7 @@ know the height of the current font, call {\tt GetDC -> GetCharHeight()}.
|
|||||||
|
|
||||||
\constfunc{int}{GetCharWidth}{\void}
|
\constfunc{int}{GetCharWidth}{\void}
|
||||||
|
|
||||||
Returns average char width in standard font. It's used as DC-independent metrics.
|
Returns average char width in standard font. It is used as DC-independent metrics.
|
||||||
|
|
||||||
{\bf Note:} This function doesn't return the {\it actual} width. If you want to
|
{\bf Note:} This function doesn't return the {\it actual} width. If you want to
|
||||||
know the height of the current font, call {\tt GetDC -> GetCharWidth()}
|
know the height of the current font, call {\tt GetDC -> GetCharWidth()}
|
||||||
|
@@ -72,7 +72,7 @@ Returns the locale name as passed to the constructor or
|
|||||||
|
|
||||||
\func{bool}{AddCatalog}{\param{const char }{*szDomain}}
|
\func{bool}{AddCatalog}{\param{const char }{*szDomain}}
|
||||||
|
|
||||||
Add a catalog for use with the current locale: it's searched for in standard
|
Add a catalog for use with the current locale: it is searched for in standard
|
||||||
places (current directory first, then the system one), 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
|
additional directories to the search path with
|
||||||
\helpref{AddCatalogLookupPathPrefix()}{wxlocaleaddcataloglookuppathprefix}.
|
\helpref{AddCatalogLookupPathPrefix()}{wxlocaleaddcataloglookuppathprefix}.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
\documentstyle[a4,11pt,makeidx,verbatim,texhelp,fancyheadings,palatino]{report}
|
\documentstyle[a4,11pt,makeidx,verbatim,texhelp,fancyheadings,palatino]{report}
|
||||||
% JACS: doesn't make it through Tex2RTF, sorry. I'll put it into texhelp.sty
|
% JACS: doesn't make it through Tex2RTF, sorry. I will put it into texhelp.sty
|
||||||
% since Tex2RTF doesn't parse it.
|
% since Tex2RTF doesn't parse it.
|
||||||
% BTW, style MUST be report for it to work for Tex2RTF.
|
% BTW, style MUST be report for it to work for Tex2RTF.
|
||||||
%KB:
|
%KB:
|
||||||
|
@@ -75,7 +75,7 @@ be no conversion problems later on.
|
|||||||
font sizes (for example, a 12-point font will appear bigger than before). Write your application
|
font sizes (for example, a 12-point font will appear bigger than before). Write your application
|
||||||
to be flexible where fonts are concerned.
|
to be flexible where fonts are concerned.
|
||||||
Don't rely on fonts being similarly-sized across platforms, as they were (by chance) between
|
Don't rely on fonts being similarly-sized across platforms, as they were (by chance) between
|
||||||
Windows and X under wxWindows 1.66. Yes, this is not easy... but I think it's better to conform to the
|
Windows and X under wxWindows 1.66. Yes, this is not easy... but I think it is better to conform to the
|
||||||
standards of each platform, and currently the size difference makes it difficult to
|
standards of each platform, and currently the size difference makes it difficult to
|
||||||
conform to Windows UI standards. You may eventually wish to build in a global 'fudge-factor' to compensate
|
conform to Windows UI standards. You may eventually wish to build in a global 'fudge-factor' to compensate
|
||||||
for size differences. The old font sizing will still be available via wx\_setup.h, so do not panic...
|
for size differences. The old font sizing will still be available via wx\_setup.h, so do not panic...
|
||||||
@@ -260,7 +260,7 @@ and simply assign the result to a wxString object. For example, replace this:
|
|||||||
|
|
||||||
{\small\begin{verbatim}
|
{\small\begin{verbatim}
|
||||||
char* s = wxFunctionThatReturnsString();
|
char* s = wxFunctionThatReturnsString();
|
||||||
s = copystring(s); // Take a copy in case it's temporary
|
s = copystring(s); // Take a copy in case it is temporary
|
||||||
.... // Do something with it
|
.... // Do something with it
|
||||||
delete[] s;
|
delete[] s;
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
@@ -362,7 +362,7 @@ Add an OnCloseWindow event handler using an EVT\_CLOSE event table entry. For de
|
|||||||
about window destruction, see the Windows Deletion Overview in the manual. This is a subtle
|
about window destruction, see the Windows Deletion Overview in the manual. This is a subtle
|
||||||
topic so please read it very carefully. Basically, OnCloseWindow is now responsible for
|
topic so please read it very carefully. Basically, OnCloseWindow is now responsible for
|
||||||
destroying a window with Destroy(), but the default implementation (for example for wxDialog) may not
|
destroying a window with Destroy(), but the default implementation (for example for wxDialog) may not
|
||||||
destroy the window, so to be sure, always provide this event handler so it's obvious what's going on.
|
destroy the window, so to be sure, always provide this event handler so it is obvious what's going on.
|
||||||
|
|
||||||
\subsection{OnEvent}
|
\subsection{OnEvent}
|
||||||
|
|
||||||
|
@@ -150,7 +150,7 @@ include "##1"}}}
|
|||||||
\newdimen\psxoffset\newdimen\psyoffset
|
\newdimen\psxoffset\newdimen\psyoffset
|
||||||
\newbox\drawingBox
|
\newbox\drawingBox
|
||||||
\newif\ifNotB@undingBox
|
\newif\ifNotB@undingBox
|
||||||
\newhelp\PShelp{Proceed: you'll have a 5cm square blank box instead of
|
\newhelp\PShelp{Proceed: you will have a 5cm square blank box instead of
|
||||||
your graphics (Jean Orloff).}
|
your graphics (Jean Orloff).}
|
||||||
\def\@mpty{}
|
\def\@mpty{}
|
||||||
\def\s@tsize#1 #2 #3 #4\@ndsize{
|
\def\s@tsize#1 #2 #3 #4\@ndsize{
|
||||||
@@ -388,7 +388,7 @@ press x or e) and rename it before retrying.}
|
|||||||
\w@{%-make sure you can \string\input\space psbox.tex (version>=1.3);}
|
\w@{%-make sure you can \string\input\space psbox.tex (version>=1.3);}
|
||||||
\w@{%-tex JOINTFIL using Plain, or LaTeX, or whatever is needed by}
|
\w@{%-tex JOINTFIL using Plain, or LaTeX, or whatever is needed by}
|
||||||
\w@{% the first part in the joining (after splitting JOINTFIL into}
|
\w@{% the first part in the joining (after splitting JOINTFIL into}
|
||||||
\w@{% it's constituents, TeX will try to process it as it stands).}
|
\w@{% it is constituents, TeX will try to process it as it stands).}
|
||||||
\w@{\string\input\space psbox.tex}
|
\w@{\string\input\space psbox.tex}
|
||||||
\w@{\string\splitfile{\string\jobname}}
|
\w@{\string\splitfile{\string\jobname}}
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@ scroll position.
|
|||||||
|
|
||||||
A wxScrolledWindow will normally scroll itself and therefore its child windows as well. It
|
A wxScrolledWindow will normally scroll itself and therefore its child windows as well. It
|
||||||
might however be desired to scroll a different window than itself: e.g. when designing a
|
might however be desired to scroll a different window than itself: e.g. when designing a
|
||||||
spreadsheet, you'll normally only have to scroll the (usually white) cell area, whereas the
|
spreadsheet, you will normally only have to scroll the (usually white) cell area, whereas the
|
||||||
(usually grey) label area will scroll very differently. For this special purpose, you can
|
(usually grey) label area will scroll very differently. For this special purpose, you can
|
||||||
call \helpref{SetTargetWindow}{wxscrolledwindowsettargetwindow} which means that pressing
|
call \helpref{SetTargetWindow}{wxscrolledwindowsettargetwindow} which means that pressing
|
||||||
the scrollbars will scroll a different window.
|
the scrollbars will scroll a different window.
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
\section{\class{wxSizer}}\label{wxsizer}
|
\section{\class{wxSizer}}\label{wxsizer}
|
||||||
|
|
||||||
wxSizer is the abstract base class used for laying out subwindows in a window. You
|
wxSizer is the abstract base class used for laying out subwindows in a window. You
|
||||||
cannot use wxSizer directly; instead, you'll have to use \helpref{wxBoxSizer}{wxboxsizer},
|
cannot use wxSizer directly; instead, you will have to use \helpref{wxBoxSizer}{wxboxsizer},
|
||||||
\helpref{wxStaticBoxSizer}{wxstaticboxsizer} or \helpref{wxNotebookSizer}{wxnotebooksizer}.
|
\helpref{wxStaticBoxSizer}{wxstaticboxsizer} or \helpref{wxNotebookSizer}{wxnotebooksizer}.
|
||||||
|
|
||||||
The layout algorithm used by sizers in wxWindows is closely related to layout
|
The layout algorithm used by sizers in wxWindows is closely related to layout
|
||||||
|
@@ -346,7 +346,7 @@ Initializes the top and bottom panes of the splitter window.
|
|||||||
\docparam{window2}{The bottom pane.}
|
\docparam{window2}{The bottom pane.}
|
||||||
|
|
||||||
\docparam{sashPosition}{The initial position of the sash. If this value is
|
\docparam{sashPosition}{The initial position of the sash. If this value is
|
||||||
positive, it specifies the size of the upper pane. If it's negative, it's
|
positive, it specifies the size of the upper pane. If it is negative, it is
|
||||||
absolute value gives the size of the lower pane. Finally, specify 0 (default)
|
absolute value gives the size of the lower pane. Finally, specify 0 (default)
|
||||||
to choose the default position (half of the total window height).}
|
to choose the default position (half of the total window height).}
|
||||||
|
|
||||||
@@ -379,7 +379,7 @@ Initializes the left and right panes of the splitter window.
|
|||||||
\docparam{window2}{The right pane.}
|
\docparam{window2}{The right pane.}
|
||||||
|
|
||||||
\docparam{sashPosition}{The initial position of the sash. If this value is
|
\docparam{sashPosition}{The initial position of the sash. If this value is
|
||||||
positive, it specifies the size of the left pane. If it's negative, it's
|
positive, it specifies the size of the left pane. If it is negative, it is
|
||||||
absolute value gives the size of the right pane. Finally, specify 0 (default)
|
absolute value gives the size of the right pane. Finally, specify 0 (default)
|
||||||
to choose the default position (half of the total window width).}
|
to choose the default position (half of the total window width).}
|
||||||
|
|
||||||
|
@@ -195,7 +195,7 @@ you create an empty stream buffer (See \helpref{wxStreamBuffer::wxStreamBuffer}{
|
|||||||
|
|
||||||
\wxheading{Remarks}
|
\wxheading{Remarks}
|
||||||
|
|
||||||
When you use this function, you'll have to destroy the IO buffers yourself
|
When you use this function, you will have to destroy the IO buffers yourself
|
||||||
after the stream buffer is destroyed or don't use it anymore.
|
after the stream buffer is destroyed or don't use it anymore.
|
||||||
In the case you use it with an empty buffer, the stream buffer will not resize
|
In the case you use it with an empty buffer, the stream buffer will not resize
|
||||||
it when it is full.
|
it when it is full.
|
||||||
|
@@ -17,7 +17,7 @@ decide whether or not to destroy the window.
|
|||||||
If the application is for some reason forcing the application to close
|
If the application is for some reason forcing the application to close
|
||||||
(\helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto} returns FALSE), the window should always be destroyed, otherwise there is the option to
|
(\helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto} returns FALSE), the window should always be destroyed, otherwise there is the option to
|
||||||
ignore the request, or maybe wait until the user has answered a question
|
ignore the request, or maybe wait until the user has answered a question
|
||||||
before deciding whether it's safe to close. The handler for EVT\_CLOSE should
|
before deciding whether it is safe to close. The handler for EVT\_CLOSE should
|
||||||
signal to the calling code if it does not destroy the window, by calling
|
signal to the calling code if it does not destroy the window, by calling
|
||||||
\helpref{wxCloseEvent::Veto}{wxcloseeventveto}. Calling this provides useful information
|
\helpref{wxCloseEvent::Veto}{wxcloseeventveto}. Calling this provides useful information
|
||||||
to the calling code.
|
to the calling code.
|
||||||
|
@@ -116,7 +116,7 @@ and \helpref{wxDocManager}{wxdocmanager} classes.
|
|||||||
See the example application in {\tt samples/docview}.
|
See the example application in {\tt samples/docview}.
|
||||||
|
|
||||||
To use the abstract wxView class, you need to derive a new class and override
|
To use the abstract wxView class, you need to derive a new class and override
|
||||||
at least the member functions OnCreate, OnDraw, OnUpdate and OnClose. You'll probably
|
at least the member functions OnCreate, OnDraw, OnUpdate and OnClose. You will probably
|
||||||
want to override OnMenuCommand to respond to menu commands from the frame containing the
|
want to override OnMenuCommand to respond to menu commands from the frame containing the
|
||||||
view.
|
view.
|
||||||
|
|
||||||
|
@@ -238,7 +238,7 @@ in, such as a frame and its children. You may use the wxID\_OK identifier, for e
|
|||||||
any number of dialogs so long as you don't have several within the same dialog.
|
any number of dialogs so long as you don't have several within the same dialog.
|
||||||
|
|
||||||
If you pass -1 to a window constructor, an identifier will be generated for you, but beware:
|
If you pass -1 to a window constructor, an identifier will be generated for you, but beware:
|
||||||
if things don't respond in the way they should, it could be because of an id conflict. It's safer
|
if things don't respond in the way they should, it could be because of an id conflict. It is safer
|
||||||
to supply window ids at all times. Automatic generation of identifiers starts at 1 so may well conflict
|
to supply window ids at all times. Automatic generation of identifiers starts at 1 so may well conflict
|
||||||
with your own identifiers.
|
with your own identifiers.
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
\section{Writing a wxWindows application: a rough guide}\label{roughguide}
|
\section{Writing a wxWindows application: a rough guide}\label{roughguide}
|
||||||
|
|
||||||
To set a wxWindows application going, you'll need to derive a \helpref{wxApp}{wxapp} class and
|
To set a wxWindows application going, you will need to derive a \helpref{wxApp}{wxapp} class and
|
||||||
override \helpref{wxApp::OnInit}{wxapponinit}.
|
override \helpref{wxApp::OnInit}{wxapponinit}.
|
||||||
|
|
||||||
An application must have a top-level \helpref{wxFrame}{wxframe} or \helpref{wxDialog}{wxdialog} window.
|
An application must have a top-level \helpref{wxFrame}{wxframe} or \helpref{wxDialog}{wxdialog} window.
|
||||||
|
@@ -29,7 +29,7 @@ appear in a message box by default (but it can be changed, see below). Notice
|
|||||||
that the standard behaviour is to not show informational messages if there are
|
that the standard behaviour is to not show informational messages if there are
|
||||||
any errors later - the logic being that the later error messages make the
|
any errors later - the logic being that the later error messages make the
|
||||||
informational messages preceding them meaningless.
|
informational messages preceding them meaningless.
|
||||||
\item{\bf wxLogVerbose} is for verbose output. Normally, it's suppressed, but
|
\item{\bf wxLogVerbose} is for verbose output. Normally, it is suppressed, but
|
||||||
might be activated if the user wishes to know more details about the program
|
might be activated if the user wishes to know more details about the program
|
||||||
progress (another, but possibly confusing name for the same function is {\bf
|
progress (another, but possibly confusing name for the same function is {\bf
|
||||||
wxLogInfo}).
|
wxLogInfo}).
|
||||||
@@ -62,7 +62,7 @@ generic mechanisms, but are not really adapted for wxWindows, while the log
|
|||||||
classes are. Some of advantages in using wxWindows log functions are:
|
classes are. Some of advantages in using wxWindows log functions are:
|
||||||
|
|
||||||
\begin{itemize}\itemsep=0pt
|
\begin{itemize}\itemsep=0pt
|
||||||
\item{\bf Portability} It's a common practice to use {\it printf()} statements or
|
\item{\bf Portability} It is a common practice to use {\it printf()} statements or
|
||||||
cout/cerr C++ streams for writing out some (debug or otherwise) information.
|
cout/cerr C++ streams for writing out some (debug or otherwise) information.
|
||||||
Although it works just fine under Unix, these messages go strictly nowhere
|
Although it works just fine under Unix, these messages go strictly nowhere
|
||||||
under Windows where the stdout of GUI programs is not assigned to anything.
|
under Windows where the stdout of GUI programs is not assigned to anything.
|
||||||
@@ -109,7 +109,7 @@ After having enumerated all the functions which are normally used to log the
|
|||||||
messages, and why would you want to use them we now describe how all this
|
messages, and why would you want to use them we now describe how all this
|
||||||
works.
|
works.
|
||||||
|
|
||||||
wxWindows has the notion of a {\it log target}: it's just a class deriving
|
wxWindows has the notion of a {\it log target}: it is just a class deriving
|
||||||
from \helpref{wxLog}{wxlog}. As such, it implements the virtual functions of
|
from \helpref{wxLog}{wxlog}. As such, it implements the virtual functions of
|
||||||
the base class which are called when a message is logged. Only one log target
|
the base class which are called when a message is logged. Only one log target
|
||||||
is {\it active} at any moment, this is the one used by {\it wxLogXXX()}
|
is {\it active} at any moment, this is the one used by {\it wxLogXXX()}
|
||||||
@@ -136,7 +136,7 @@ stderr by default as its name suggests.
|
|||||||
\item{\bf wxLogStream} This class has the same functionality as wxLogStderr,
|
\item{\bf wxLogStream} This class has the same functionality as wxLogStderr,
|
||||||
but uses {\it ostream} and cerr instead of {\it FILE *} and stderr.
|
but uses {\it ostream} and cerr instead of {\it FILE *} and stderr.
|
||||||
\item{\bf wxLogGui} This is the standard log target for wxWindows
|
\item{\bf wxLogGui} This is the standard log target for wxWindows
|
||||||
applications (it's used by default if you don't do anything) and provides the
|
applications (it is used by default if you don't do anything) and provides the
|
||||||
most reasonable handling of all types of messages for given platform.
|
most reasonable handling of all types of messages for given platform.
|
||||||
\item{\bf wxLogWindow} This log target provides a "log console" which
|
\item{\bf wxLogWindow} This log target provides a "log console" which
|
||||||
collects all messages generated by the application and also passes them to the
|
collects all messages generated by the application and also passes them to the
|
||||||
@@ -146,7 +146,7 @@ clear the log, close it completely or save all messages to file.
|
|||||||
anything. The objects of this class may be instantiated to (temporarily)
|
anything. The objects of this class may be instantiated to (temporarily)
|
||||||
suppress output of {\it wxLogXXX()} functions. As an example, trying to open a
|
suppress output of {\it wxLogXXX()} functions. As an example, trying to open a
|
||||||
non-existing file will usually provoke an error message, but if for some
|
non-existing file will usually provoke an error message, but if for some
|
||||||
reasons it's unwanted, just use this construction:
|
reasons it is unwanted, just use this construction:
|
||||||
|
|
||||||
{\small
|
{\small
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
|
@@ -77,7 +77,7 @@ which works best on the current platform.
|
|||||||
|
|
||||||
\subsection{wxCSConv}
|
\subsection{wxCSConv}
|
||||||
|
|
||||||
The wxCSConv class is special because when it's instantiated, you can tell it
|
The wxCSConv class is special because when it is instantiated, you can tell it
|
||||||
which character set it should use, which makes it meaningful to keep many
|
which character set it should use, which makes it meaningful to keep many
|
||||||
instances of them around, each with a different character set (or you can
|
instances of them around, each with a different character set (or you can
|
||||||
create a wxCSConv instance on the fly).
|
create a wxCSConv instance on the fly).
|
||||||
|
@@ -36,7 +36,7 @@ user interface elements, see \helpref{wxWindows resource functions}{resourcefunc
|
|||||||
|
|
||||||
\subsection{The format of a .WXR file}
|
\subsection{The format of a .WXR file}
|
||||||
|
|
||||||
A wxWindows resource file may look a little odd at first. It's C++
|
A wxWindows resource file may look a little odd at first. It is C++
|
||||||
compatible, comprising mostly of static string variable declarations with
|
compatible, comprising mostly of static string variable declarations with
|
||||||
PrologIO syntax within the string.
|
PrologIO syntax within the string.
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ parenthesis, a list of comma-delimited attribute/value pairs, a closing
|
|||||||
parenthesis, and a full stop. Backslashes are required to escape newlines,
|
parenthesis, and a full stop. Backslashes are required to escape newlines,
|
||||||
for the benefit of C++ syntax. If double quotation marks are used to
|
for the benefit of C++ syntax. If double quotation marks are used to
|
||||||
delimit strings, they need to be escaped with backslash within a C++ string
|
delimit strings, they need to be escaped with backslash within a C++ string
|
||||||
(so it's easier to use single quotation marks instead).
|
(so it is easier to use single quotation marks instead).
|
||||||
|
|
||||||
\normalbox{{\it A note on PrologIO string syntax:} A string that begins with
|
\normalbox{{\it A note on PrologIO string syntax:} A string that begins with
|
||||||
an alphabetic character, and contains only alphanumeric characters,
|
an alphabetic character, and contains only alphanumeric characters,
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
Classes: \helpref{wxWindow}{wxwindow}, \helpref{wxScrolledWindow}{wxscrolledwindow}, \helpref{wxIcon}{wxicon}, \helpref{wxScrollBar}{wxscrollbar}.
|
Classes: \helpref{wxWindow}{wxwindow}, \helpref{wxScrolledWindow}{wxscrolledwindow}, \helpref{wxIcon}{wxicon}, \helpref{wxScrollBar}{wxscrollbar}.
|
||||||
|
|
||||||
Scrollbars come in various guises in wxWindows. All windows have the potential
|
Scrollbars come in various guises in wxWindows. All windows have the potential
|
||||||
to show a vertical scrollbar and/or a horizontal scrollbar: it's a basic capability of a window.
|
to show a vertical scrollbar and/or a horizontal scrollbar: it is a basic capability of a window.
|
||||||
However, in practice, not all windows do make use of scrollbars, such as a single-line wxTextCtrl.
|
However, in practice, not all windows do make use of scrollbars, such as a single-line wxTextCtrl.
|
||||||
|
|
||||||
Because any class derived from \helpref{wxWindow}{wxwindow} may have scrollbars,
|
Because any class derived from \helpref{wxWindow}{wxwindow} may have scrollbars,
|
||||||
@@ -18,7 +18,7 @@ events varies from one window class to another.
|
|||||||
\helpref{wxScrolledWindow}{wxscrolledwindow} (formerly wxCanvas) is an example of a window that
|
\helpref{wxScrolledWindow}{wxscrolledwindow} (formerly wxCanvas) is an example of a window that
|
||||||
adds functionality to make scrolling really work. It assumes that scrolling happens in
|
adds functionality to make scrolling really work. It assumes that scrolling happens in
|
||||||
consistent units, not different-sized jumps, and that page size is represented
|
consistent units, not different-sized jumps, and that page size is represented
|
||||||
by the visible portion of the window. It's suited to drawing applications, but perhaps
|
by the visible portion of the window. It is suited to drawing applications, but perhaps
|
||||||
not so suitable for a sophisticated editor in which the amount scrolled may vary according
|
not so suitable for a sophisticated editor in which the amount scrolled may vary according
|
||||||
to the size of text on a given line. For this, you would derive from wxWindow and
|
to the size of text on a given line. For this, you would derive from wxWindow and
|
||||||
implement scrolling yourself. \helpref{wxGrid}{wxgrid} is an example of a class
|
implement scrolling yourself. \helpref{wxGrid}{wxgrid} is an example of a class
|
||||||
@@ -42,7 +42,7 @@ the way a scrollbar is modeled. This function takes the following arguments:
|
|||||||
the built-in horizontal or vertical scrollbar.
|
the built-in horizontal or vertical scrollbar.
|
||||||
|
|
||||||
{\it position} is simply the position of the `thumb' (the bit you drag to scroll around).
|
{\it position} is simply the position of the `thumb' (the bit you drag to scroll around).
|
||||||
It's given in scroll units, and so is relative to the total range of the scrollbar.
|
It is given in scroll units, and so is relative to the total range of the scrollbar.
|
||||||
|
|
||||||
{\it visible} gives the number of scroll units that represents the portion of the
|
{\it visible} gives the number of scroll units that represents the portion of the
|
||||||
window currently visible. Normally, a scrollbar is capable of indicating this visually
|
window currently visible. Normally, a scrollbar is capable of indicating this visually
|
||||||
@@ -51,7 +51,7 @@ by showing a different length of thumb.
|
|||||||
{\it range} is the maximum value of the scrollbar, where zero is the start
|
{\it range} is the maximum value of the scrollbar, where zero is the start
|
||||||
position. You choose the units that suit you,
|
position. You choose the units that suit you,
|
||||||
so if you wanted to display text that has 100 lines, you would set this to 100.
|
so if you wanted to display text that has 100 lines, you would set this to 100.
|
||||||
Note that this doesn't have to correspond to the number of pixels scrolled - it's
|
Note that this doesn't have to correspond to the number of pixels scrolled - it is
|
||||||
up to you how you actually show the contents of the window.
|
up to you how you actually show the contents of the window.
|
||||||
|
|
||||||
{\it refresh} just indicates whether the scrollbar should be repainted immediately or not.
|
{\it refresh} just indicates whether the scrollbar should be repainted immediately or not.
|
||||||
@@ -83,7 +83,7 @@ from your \helpref{wxWindow::OnSize}{wxwindowonsize} event handler function.
|
|||||||
|
|
||||||
%\normalbox{{\bf For Windows programmers:} note that scrollbar range in wxWindows has a different meaning
|
%\normalbox{{\bf For Windows programmers:} note that scrollbar range in wxWindows has a different meaning
|
||||||
%from that in Windows. In native Windows scrollbar calls, range is the number of positions that the scrollbar
|
%from that in Windows. In native Windows scrollbar calls, range is the number of positions that the scrollbar
|
||||||
%can physically scroll through - in our example above, it would be 34. But it's easier
|
%can physically scroll through - in our example above, it would be 34. But it is easier
|
||||||
%to think in terms of the number of units that the whole scrollbar represents - the virtual
|
%to think in terms of the number of units that the whole scrollbar represents - the virtual
|
||||||
%window size - which is why wxWindows does it differently.}
|
%window size - which is why wxWindows does it differently.}
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ the advanced users of the program, the experience shows that the tips may be
|
|||||||
quite helpful for the novices and so more and more programs now do this.
|
quite helpful for the novices and so more and more programs now do this.
|
||||||
|
|
||||||
For a wxWindows programmer, implementing this feature is extremely easy. To
|
For a wxWindows programmer, implementing this feature is extremely easy. To
|
||||||
show a tip, it's enough to just call \helpref{wxShowTip}{wxshowtip} function
|
show a tip, it is enough to just call \helpref{wxShowTip}{wxshowtip} function
|
||||||
like this:
|
like this:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
@@ -19,7 +19,7 @@ like this:
|
|||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
Of course, you need to get the text of the tips from somewhere - in the example
|
Of course, you need to get the text of the tips from somewhere - in the example
|
||||||
above, the text is supposed to be in the file tips.txt from where it's read by
|
above, the text is supposed to be in the file tips.txt from where it is read by
|
||||||
the {\it tip provider}. The tip provider is just an object of a class deriving
|
the {\it tip provider}. The tip provider is just an object of a class deriving
|
||||||
from \helpref{wxTipProvider}{wxtipprovider}. It has to implement one pure
|
from \helpref{wxTipProvider}{wxtipprovider}. It has to implement one pure
|
||||||
virtual function of the base class: \helpref{GetTip}{wxtipprovidergettip}.
|
virtual function of the base class: \helpref{GetTip}{wxtipprovidergettip}.
|
||||||
|
@@ -72,7 +72,7 @@ Include {\tt "wx/toolbar.h"}, or if using a class directly, one of:
|
|||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
Example of toolbar use are given in the sample program ``toolbar''. The
|
Example of toolbar use are given in the sample program ``toolbar''. The
|
||||||
source is given below. In fact it's out of date because recommended
|
source is given below. In fact it is out of date because recommended
|
||||||
practise is to use event handlers (using EVT\_MENU or EVT\_TOOL) instead of
|
practise is to use event handlers (using EVT\_MENU or EVT\_TOOL) instead of
|
||||||
overriding OnLeftClick.
|
overriding OnLeftClick.
|
||||||
|
|
||||||
|
@@ -116,7 +116,7 @@ a separate type for strings though, because the standard
|
|||||||
Unicode strings depending on the compile mode.
|
Unicode strings depending on the compile mode.
|
||||||
|
|
||||||
Finally, there is a special {\tt wxT()} macro which should enclose all literal
|
Finally, there is a special {\tt wxT()} macro which should enclose all literal
|
||||||
strings in the program. As it's easy to see comparing the last fragment with
|
strings in the program. As it is easy to see comparing the last fragment with
|
||||||
the one above, this macro expands to nothing in the (usual) ANSI mode and
|
the one above, this macro expands to nothing in the (usual) ANSI mode and
|
||||||
prefixes {\tt 'L'} to its argument in the Unicode mode.
|
prefixes {\tt 'L'} to its argument in the Unicode mode.
|
||||||
|
|
||||||
|
@@ -117,6 +117,6 @@ void wxDialog::OnOK(wxCommandEvent& event)
|
|||||||
So if using validators and a normal OK button, you may not even need to write any
|
So if using validators and a normal OK button, you may not even need to write any
|
||||||
code for handling dialog dismissal.
|
code for handling dialog dismissal.
|
||||||
|
|
||||||
If you load your dialog from a resource file, you'll need to iterate through the controls
|
If you load your dialog from a resource file, you will need to iterate through the controls
|
||||||
setting validators, since validators can't be specified in a dialog resource.
|
setting validators, since validators can't be specified in a dialog resource.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user