From 40ca9449747e20b5b4a1c7086d5262bec0ee8a5c Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Fri, 8 Apr 2005 19:11:58 +0000 Subject: [PATCH] Various underscore doc fixes and some wxXCharBuffer documentation. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/artprov.tex | 6 +++--- docs/latex/wx/mbcnvfil.tex | 9 ++------- docs/latex/wx/settings.tex | 4 ++-- docs/latex/wx/tbuffer.tex | 31 +++++++++++++++++++++++++++++++ docs/latex/wx/topics.tex | 1 + docs/latex/wx/wxmsw.tex | 4 ++-- 6 files changed, 41 insertions(+), 14 deletions(-) create mode 100644 docs/latex/wx/tbuffer.tex diff --git a/docs/latex/wx/artprov.tex b/docs/latex/wx/artprov.tex index fedf79d678..16a804837e 100644 --- a/docs/latex/wx/artprov.tex +++ b/docs/latex/wx/artprov.tex @@ -176,12 +176,12 @@ The bitmap if one of registered providers recognizes the ID or wxNullBitmap othe Same as \helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap}, but return a wxIcon object (or wxNullIcon on failure). -\func{static wxSize}{GetSizeHint}{\param{const wxArtClient\& }{client}, \param{bool }{platform_default = false}} +\func{static wxSize}{GetSizeHint}{\param{const wxArtClient\& }{client}, \param{bool }{platform\_default = false}} Returns a suitable size hint for the given {\it wxArtClient}. If -{\it platform_default} is \true, return a size based on the current platform, +{\it platform\_default} is \true, return a size based on the current platform, otherwise return the size from the topmost wxArtProvider. {\it wxDefaultSize} may be -returned if the client doesn't have a specified size, like wxART_OTHER for example. +returned if the client doesn't have a specified size, like wxART\_OTHER for example. \membersection{wxArtProvider::PopProvider}\label{wxartproviderctor} diff --git a/docs/latex/wx/mbcnvfil.tex b/docs/latex/wx/mbcnvfil.tex index 2ed8c847df..fc3f3d8388 100644 --- a/docs/latex/wx/mbcnvfil.tex +++ b/docs/latex/wx/mbcnvfil.tex @@ -1,8 +1,3 @@ -% -% automatically generated by HelpGen from -% ../include/wx/strconv.h at 25/Mar/00 10:20:56 -% - \section{\class{wxMBConvFile}}\label{wxmbconvfile} This class used to define the class instance @@ -12,9 +7,9 @@ either of type wxConvLibc (on most platforms) or wxConvUTF8 filesystem multibyte encoding and Unicode. {\bf wxConvFileName} can also be set to a something else at run-time which is used e.g. by wxGTK to use a class which checks the environment -variable {\bf G_FILESYSTEM_ENCODING} indicating that filenames +variable {\bf G\_FILESYSTEM\_ENCODING} indicating that filenames should not be interpreted as UTF8 and also for converting -invalid UTF8 characters (e.g. if there is a filename in iso8859_1) +invalid UTF8 characters (e.g. if there is a filename in iso8859\_1) to strings with octal values. Since some platforms (such as Win32) use Unicode in the filenames, diff --git a/docs/latex/wx/settings.tex b/docs/latex/wx/settings.tex index cf7dc16b94..3f290a8a30 100644 --- a/docs/latex/wx/settings.tex +++ b/docs/latex/wx/settings.tex @@ -103,7 +103,7 @@ Returns the value of a system metric, or -1 if the metric is not supported on th The value of {\it win} determines if the metric returned is a global value or a \helpref{wxWindow}{wxwindow} based value, in which case it might determine the widget, the display the window is on, or something similar. The window given should be as close to the -metric as possible (e.g a wxTopLevelWindow in case of the wxSYS_CAPTION_Y metric). +metric as possible (e.g a wxTopLevelWindow in case of the wxSYS\_CAPTION\_Y metric). {\it index} can be one of: @@ -159,7 +159,7 @@ where it would otherwise present the information only in audible form; zero othe Specifying the {\it win} parameter is encouraged, because some metrics on some ports are not supported without one, or they might be capable of reporting better values if given one. If a window does not make sense for a metric, one should still be given, as for example it might determine which displays cursor width is requested with -wxSYS_CURSOR_X. +wxSYS\_CURSOR\_X. \pythonnote{This static method is implemented in Python as a standalone function named {\tt wxSystemSettings\_GetMetric}} diff --git a/docs/latex/wx/tbuffer.tex b/docs/latex/wx/tbuffer.tex new file mode 100644 index 0000000000..577a746e87 --- /dev/null +++ b/docs/latex/wx/tbuffer.tex @@ -0,0 +1,31 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: tbuffer.tex +%% Purpose: wxXXXBuffer classes overview +%% Author: Ryan Norton +%% Modified by: All wxWidgets Developers +%% Created: 04/08/2005 +%% RCS-ID: $Id$ +%% Copyright: (c) wxWidgets team +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{Buffer classes overview}\label{bufferclasses} + +wxWidgets uses two classes of classes for dealing with buffers in memory. + +The first is one for dealing with character buffers, namely wxCharBuffer for char pointer or multi-byte c strings and wxWCharBuffer for wchar\_t pointer or wide character c strings. + +Secondly, wxWidgets uses, although only rarely currently, wxMemoryBuffer for dealing with raw buffers in memory. + +\subsection{wxXCharBuffer Overview}\label{wxcbov} + +\wxheading{General Usage} + +As mentioned, wxCharBuffer and its wide character variant wxWCharBuffer deal with c strings in memory. They have two constructors, one in which you pass the c string you want them to have a copy of, and another where you specify the size of the buffer in memory in characters you want. + +wxCharBuffer and its variant only contain the c string as a member, so they can be used safely to c functions with variable arguments such as printf. They also contain standard assignment, character access operators and a copy constructor. + +\wxheading{Destruction} + +It should be noted that on destruction wxCharBuffer and its wide character variant delete the c string that hold onto. If you want to get the pointer to the buffer and don't want wxCharBuffer to delete it on destruction, use the member function release to do so. + diff --git a/docs/latex/wx/topics.tex b/docs/latex/wx/topics.tex index 7cb08c38ed..93c0fc83f5 100644 --- a/docs/latex/wx/topics.tex +++ b/docs/latex/wx/topics.tex @@ -12,6 +12,7 @@ This chapter contains a selection of topic overviews. \input tapp.tex \input truntime.tex \input tstring.tex +\input tbuffer.tex \input tdate.tex \input tunicode.tex \input tmbconv.tex diff --git a/docs/latex/wx/wxmsw.tex b/docs/latex/wx/wxmsw.tex index 377a432e61..15031681d8 100644 --- a/docs/latex/wx/wxmsw.tex +++ b/docs/latex/wx/wxmsw.tex @@ -134,7 +134,7 @@ and unregister the button when you're done with it. For example: win->UnregisterHotKey(0); \end{verbatim} -You may have to register the buttons in a wxEVT_ACTIVATE event handler +You may have to register the buttons in a wxEVT\_ACTIVATE event handler since other applications will grab the buttons. There is currently no method of finding out the names of the special @@ -165,7 +165,7 @@ and wxTopLevelWindow::SetRightMenu, for example: #endif \end{verbatim} -For implementing property sheets (flat tabs), use a wxNotebook with wxNB_FLAT|wxNB_BOTTOM +For implementing property sheets (flat tabs), use a wxNotebook with wxNB\_FLAT|wxNB\_BOTTOM and have the notebook left, top and right sides overlap the dialog by about 3 pixels to eliminate spurious borders. You can do this by using a negative spacing in your sizer Add() call. The cross-platform property sheet dialog \helpref{wxPropertySheetDialog}{wxpropertysheetdialog} is -- 2.45.2