From 85ec2f26343b107d32d3821217f47ade57fcadc0 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sun, 12 Dec 1999 17:02:50 +0000 Subject: [PATCH] Some doc updates. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/category.tex | 1 + docs/latex/wx/classes.tex | 1 + docs/latex/wx/dir.tex | 2 +- docs/latex/wx/fltinstr.tex | 4 +-- docs/latex/wx/function.tex | 19 ++++---------- docs/latex/wx/nbsizer.tex | 54 ++++++++++++++++++++++++++++++++++++++ docs/latex/wx/sizer.tex | 4 +-- docs/latex/wx/stream.tex | 2 +- docs/latex/wx/strmbfrd.tex | 7 ++--- docs/latex/wx/strmmem.tex | 6 ++--- src/gtk/tbargtk.cpp | 4 +-- src/gtk1/tbargtk.cpp | 4 +-- 12 files changed, 78 insertions(+), 30 deletions(-) create mode 100644 docs/latex/wx/nbsizer.tex diff --git a/docs/latex/wx/category.tex b/docs/latex/wx/category.tex index bc6a912826..5197ef1b72 100644 --- a/docs/latex/wx/category.tex +++ b/docs/latex/wx/category.tex @@ -111,6 +111,7 @@ These are the classes relevant to the sizer-based layout. \twocolitem{\helpref{wxSizer}{wxsizer}}{Abstract base class} \twocolitem{\helpref{wxBoxSizer}{wxboxsizer}}{A sizer for laying out windows in a row or column} \twocolitem{\helpref{wxStaticBoxSizer}{wxstaticboxsizer}}{Same as wxBoxSizer, but with surrounding static box} +\twocolitem{\helpref{wxNotebookSizer}{wxnotebooksizer}}{Sizer to use with the wxNotebook control.} \end{twocollist} \overview{Overview}{constraintsoverview} over the constraints-based layout. diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex index 38b1ac3b46..2ff1de9f8a 100644 --- a/docs/latex/wx/classes.tex +++ b/docs/latex/wx/classes.tex @@ -150,6 +150,7 @@ \input mltchdlg.tex \input mutex.tex \input mutexlck.tex +\input nbsizer.tex \input node.tex \input notebook.tex \input noteevt.tex diff --git a/docs/latex/wx/dir.tex b/docs/latex/wx/dir.tex index 676d62c3b2..e2e7997c3e 100644 --- a/docs/latex/wx/dir.tex +++ b/docs/latex/wx/dir.tex @@ -54,7 +54,7 @@ enum wxDIR_DOTDOT = 0x0008, // include '.' and '..' // by default, enumerate everything except '.' and '..' - wxDIR_DEFAULT = wxDIR\_FILES | wxDIR\_DIRS | wxDIR\_HIDDEN + wxDIR_DEFAULT = wxDIR_FILES | wxDIR_DIRS | wxDIR_HIDDEN } \end{verbatim} } diff --git a/docs/latex/wx/fltinstr.tex b/docs/latex/wx/fltinstr.tex index 29a526a419..34de127891 100644 --- a/docs/latex/wx/fltinstr.tex +++ b/docs/latex/wx/fltinstr.tex @@ -4,7 +4,7 @@ \section{\class{wxFilterInputStream}}\label{wxfilterinputstream} A filter stream has the capability of a normal stream but it can be placed on top -of another stream. So, for example, it can uncompress, uncrypt the datas which are read +of another stream. So, for example, it can uncompress or uncrypt the data which are read from another stream and pass it to the requester. \wxheading{Derived from} @@ -18,7 +18,7 @@ from another stream and pass it to the requester. \wxheading{Note} -The use of this class is exactly the same as of wxInputStream. Only a constructor +The interface of this class is the same as that of wxInputStream. Only a constructor differs and it is documented below. % ----------- diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index da99a835ba..9dcba0b2e7 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -12,7 +12,7 @@ The functions defined in wxWindows are described here. \wxheading{See also} -\helpref{wxPathList}{wxpathlist} +\helpref{wxPathList}{wxpathlist}, \helpref{wxDir}{wxdir}, \helpref{wxFile}{wxfile} \membersection{::wxDirExists} @@ -281,6 +281,7 @@ Returns TRUE if successful, FALSE otherwise. \membersection{::wxGetHostName}\label{wxgethostname} \func{wxString}{wxGetHostName}{\void} + \func{bool}{wxGetHostName}{\param{char * }{buf}, \param{int }{sz}} Copies the current host machine's name into the supplied buffer. Please note @@ -306,6 +307,7 @@ See also: \helpref{wxGetFullHostName}{wxgetfullhostname} \membersection{::wxGetUserId}\label{wxgetuserid} \func{wxString}{wxGetUserId}{\void} + \func{bool}{wxGetUserId}{\param{char * }{buf}, \param{int }{sz}} This function returns the "user id" also known as "login name" under Unix i.e. @@ -328,6 +330,7 @@ See also: \helpref{wxGetUserName}{wxgetusername} \membersection{::wxGetUserName}\label{wxgetusername} \func{wxString}{wxGetUserName}{\void} + \func{bool}{wxGetUserName}{\param{char * }{buf}, \param{int }{sz}} This function returns the full user name (something like "Mr. John Smith"). @@ -863,7 +866,7 @@ Sets the translation (from the top left corner) for PostScript output. The defau \section{Clipboard functions}\label{clipsboard} These clipboard functions are implemented for Windows only. The use of these functions -is drepated and the code no longer maintained. Use the \helpref{wxClipboard}{wxclipboard} +is deprecated and the code is no longer maintained. Use the \helpref{wxClipboard}{wxclipboard} class instead. \wxheading{Include files} @@ -1298,18 +1301,6 @@ Return the (current) user's home directory. -\membersection{::wxGetHostName} - -\func{bool}{wxGetHostName}{\param{const wxString\& }{buf}, \param{int}{ bufSize}} - -Copies the host name of the machine the program is running on into the -buffer {\it buf}, of maximum size {\it bufSize}, returning TRUE if -successful. - -\wxheading{Include files} - - - \membersection{::wxGetElapsedTime}\label{wxgetelapsedtime} \func{long}{wxGetElapsedTime}{\param{bool}{ resetTimer = TRUE}} diff --git a/docs/latex/wx/nbsizer.tex b/docs/latex/wx/nbsizer.tex new file mode 100644 index 0000000000..4575e9d87b --- /dev/null +++ b/docs/latex/wx/nbsizer.tex @@ -0,0 +1,54 @@ +\section{\class{wxNotebookSizer}}\label{wxnotebooksizer} + +wxNotebookSizer is a specialized sizer to make sizers work in connection +with using notebooks. This sizer is different from any other sizer as +you must not add any children to it - instead, it queries the notebook class itself. +The only thing this sizer does is to determine the size of the biggest +page of the notebook and report an adjusted minimal size to a more toplevel +sizer. + +In order to query the size of notebook page, this page needs to have its +own sizer, otherwise the wxNotebookSizer will ignore it. Notebook pages +get there sizer by assiging one to them using \helpref{wxWindow::SetSizer}{wxwindowsetsizer} +and setting the auto-layout option to TRUE using +\helpref{wxWindow::SetAutolayout}{wxwindowsetautoLayout}. Here is one +example showing how to add a notebook page that the notebook sizer is +aware of: + +\begin{verbatim} + wxNotebook *notebook = new wxNotebook( &dialog, -1 ); + wxNotebookSizer *nbs = new wxNotebookSizer( notebook ); + + // Add panel as notebook page + wxPanel *panel = new wxPanel( notebook, -1 ); + notebook->AddPage( panel, "My Notebook Page" ); + + wxBoxSizer *panelsizer = new wxBoxSizer( wxVERTICAL ); + + // Add controls to panel and panelsizer here... + + panel->SetAutoLayout( TRUE ); + panel->SetSizer( panelsizer ); +\end{verbatim} + +See also \helpref{wxSizer}{wxsizer}, \helpref{wxNotebook}{wxnotebook}. + +\wxheading{Derived from} + +\helpref{wxSizer}{wxsizer}\\ +\helpref{wxObject}{wxobject} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxNotebookSizer::wxNotebookSizer}\label{wxnotebooksizerwxnotebooksizer} + +\func{}{wxNotebookSizer}{\param{wxNotebook* }{notebook}} + +Constructor. It takes an associated notebook as its only parameter. + +\membersection{wxNotebookSizer::GetNotebook}\label{wxnotebooksizergetnotebook} + +\func{wxNotebook*}{GetNotebook}{\void} + +Returns the notebook associated with the sizer. + diff --git a/docs/latex/wx/sizer.tex b/docs/latex/wx/sizer.tex index 8401f7fb86..3d8c05f22c 100644 --- a/docs/latex/wx/sizer.tex +++ b/docs/latex/wx/sizer.tex @@ -1,8 +1,8 @@ \section{\class{wxSizer}}\label{wxsizer} 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} -or \helpref{wxStaticBoxSizer}{wxstaticboxsizer}. +cannot use wxSizer directly; instead, you'll have to use \helpref{wxBoxSizer}{wxboxsizer}, +\helpref{wxStaticBoxSizer}{wxstaticboxsizer} or \helpref{wxNotebookSizer}{wxnotebooksizer}. The layout algorithm used by sizers in wxWindows is closely related to layout in other GUI toolkits, such as Java's AWT, the GTK toolkit or the Qt toolkit. It is diff --git a/docs/latex/wx/stream.tex b/docs/latex/wx/stream.tex index d1543a6772..889dd9efb3 100644 --- a/docs/latex/wx/stream.tex +++ b/docs/latex/wx/stream.tex @@ -198,7 +198,7 @@ you create an empty stream buffer (See \helpref{wxStreamBuffer::wxStreamBuffer}{ When you use this function, you'll have to destroy the IO buffers yourself 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 grow +In the case you use it with an empty buffer, the stream buffer will not resize it when it is full. \wxheading{See also} diff --git a/docs/latex/wx/strmbfrd.tex b/docs/latex/wx/strmbfrd.tex index e9c636b25b..eaeb7725ea 100644 --- a/docs/latex/wx/strmbfrd.tex +++ b/docs/latex/wx/strmbfrd.tex @@ -19,7 +19,8 @@ from (such as a file stream or a memory stream). \wxheading{See also} -\helpref{wxStreamBuffer}{wxstreambuffer}, \helpref{wxInputStream}{wxinputstream} +\helpref{wxStreamBuffer}{wxstreambuffer}, \helpref{wxInputStream}{wxinputstream}, +\helpref{wxBufferedOutputStream}{wxbufferedoutputstream} % ----------------------------------------------------------------------------- % wxBufferedOutputStream @@ -28,7 +29,7 @@ from (such as a file stream or a memory stream). This stream acts as a cache. It caches the bytes to be written to the specified output stream (See \helpref{wxFilterOutputStream}{wxfilteroutputstream}). The -datas are only written when the cache is full, when the buffered stream is +data is only written when the cache is full, when the buffered stream is destroyed or when calling SeekO(). This class may not be used without some other stream to write the data @@ -44,7 +45,7 @@ to (such as a file stream or a memory stream). \wxheading{See also} -\helpref{wxStreamBuffer}{wxstreamBuffer}, \helpref{wxOutputStream}{wxoutputstream} +\helpref{wxStreamBuffer}{wxstreambuffer}, \helpref{wxOutputStream}{wxoutputstream} % ---------- % Members diff --git a/docs/latex/wx/strmmem.tex b/docs/latex/wx/strmmem.tex index 02b78ab155..6310696d91 100644 --- a/docs/latex/wx/strmmem.tex +++ b/docs/latex/wx/strmmem.tex @@ -13,7 +13,7 @@ \wxheading{See also} -\helpref{wxStreamBuffer}{wxstreambuffer} +\helpref{wxStreamBuffer}{wxstreambuffer}, \helpref{wxMemoryOutputStream}{wxmemoutputstream} % ---------- % Members @@ -26,11 +26,11 @@ Initializes a new read-only memory stream which will use the specified buffer {\it data} of length {\it len}. The stream does not take ownership of the -buffer, i.e. that it will not delete in its constructor. +buffer, i.e. that it will not delete in its destructor. \membersection{wxMemoryInputStream::\destruct{wxMemoryInputStream}} -\func{}{\destruct{wxFileInputStream}}{\void} +\func{}{\destruct{wxMemoryInputStream}}{\void} Destructor. diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index 7df75acd3a..a297e9653c 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -655,8 +655,8 @@ void wxToolBar::OnInternalIdle() as setting the cursor in a parent window also effects the windows above so that checking for the current cursor is not possible. */ - - if (HasFlag(wxTB_DOCKABLE)) + + if (HasFlag(wxTB_DOCKABLE) && (m_widget->window)) { /* if the toolbar is dockable, then m_widget stands for the GtkHandleBox widget, which uses its own window so that we diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index 7df75acd3a..a297e9653c 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -655,8 +655,8 @@ void wxToolBar::OnInternalIdle() as setting the cursor in a parent window also effects the windows above so that checking for the current cursor is not possible. */ - - if (HasFlag(wxTB_DOCKABLE)) + + if (HasFlag(wxTB_DOCKABLE) && (m_widget->window)) { /* if the toolbar is dockable, then m_widget stands for the GtkHandleBox widget, which uses its own window so that we -- 2.45.2