From 598e55d7143d4fca6cd7e2562cff5310671b7cd3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 12 May 2007 18:24:12 +0000 Subject: [PATCH] another patch bring the docs more up to date (patch 1717776) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/body.tex | 57 ++++++++++++-------------------------- docs/latex/wx/libs.tex | 53 ++++++++++++++++++++++------------- docs/latex/wx/portnote.tex | 15 ++++++++++ 3 files changed, 65 insertions(+), 60 deletions(-) diff --git a/docs/latex/wx/body.tex b/docs/latex/wx/body.tex index 3b17cb8bf7..2e0f5b5363 100644 --- a/docs/latex/wx/body.tex +++ b/docs/latex/wx/body.tex @@ -500,14 +500,8 @@ descriptions of miscellaneous file handling functions. \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% \setfooter{\thepage}{}{}{}{}{\thepage}% -In addition to the core wxWidgets library, a number of further -libraries and utilities are supplied with each distribution. - -Some are under the 'contrib' hierarchy which mirrors the -structure of the main wxWidgets hierarchy. See also the 'utils' -hierarchy. The first place to look for documentation about -these tools and libraries is under the wxWidgets 'docs' hierarchy, -for example {\tt docs/htmlhelp/fl.chm}. +In addition to the \helpref{wxWidgets libraries}{librarieslist}, some +additional utilities are supplied in the \tt{utils} hierarchy. For other user-contributed packages, please see the Contributions page on the \urlref{wxWidgets Web site}{http://www.wxwidgets.org}. @@ -535,19 +529,6 @@ Helpgen can be found in {\tt utils/HelpGen}. Xnest-based display emulator for X11-based PDA applications. On some systems, the Xnest window does not synchronise with the 'skin' window. This program can be found in {\tt utils/emulator}. -\item[{\bf XRC resource system}] -This is the sizer-aware resource system, and uses -XML-based resource specifications that can be generated by tools -such as \urlref{wxDesigner}{http://www.roebling.de}. -You can find this in {\tt src/xrc}, {\tt include/wx/xrc}, {\tt samples/xrc}. -For more information, see the \helpref{XML-based resource system overview}{xrcoverview}. -\item[{\bf Net library}] -Net is a collection of very simple mail and web related classes. Currently -there is only wxEmail, which makes it easy to send email messages via MAPI on Windows or sendmail on Unix. -You can find this in {\tt contrib/src/net} and {\tt contrib/include/wx/net}. -\item[{\bf Styled Text Control library}] -STC is a wrapper around Scintilla, a syntax-highlighting text editor. -You can find this in {\tt src/stc}, {\tt include/wx/stc}, and {\tt samples/stc}. \end{description} \chapter{Programming strategies}\label{strategies} @@ -562,41 +543,37 @@ please submit them for inclusion here. \subsection{Use ASSERT}\label{useassert} -Although I haven't done this myself within wxWidgets, it is good -practice to use ASSERT statements liberally, that check for conditions that -should or should not hold, and print out appropriate error messages. +It is good practice to use ASSERT statements liberally, that check for conditions +that should or should not hold, and print out appropriate error messages. + These can be compiled out of a non-debugging version of wxWidgets and your application. Using ASSERT is an example of `defensive programming': it can alert you to problems later on. +See \helpref{wxASSERT}{wxassert} for more info. + \subsection{Use wxString in preference to character arrays}\label{usewxstring} -Using wxString can be much safer and more convenient than using wxChar *. -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 -leaks substantially, and it is much more convenient to use the overloaded -operators than functions such as strcmp. wxString won't add a significant -overhead to your program; the overhead is compensated for by easier -manipulation (which means less code). +Using \helpref{wxString}{wxstring} can be much safer and more convenient than using wxChar *. + +You can reduce the possibility of memory leaks substantially, and it is much more +convenient to use the overloaded operators than functions such as \tt{strcmp}. +wxString won't add a significant overhead to your program; the overhead is compensated +for by easier manipulation (which means less code). The same goes for other data types: use classes wherever possible. \section{Strategies for portability}\label{portability} -\subsection{Use relative positioning or constraints}\label{userelativepositioning} +\subsection{Use sizers}\label{usesizers} Don't use absolute panel item positioning if you can avoid it. Different GUIs have -very differently sized panel items. Consider using the constraint system, although this -can be complex to program. - -Alternatively, you could use alternative .wrc (wxWidgets resource files) on different -platforms, with slightly different dimensions in each. Or space your panel items out -to avoid problems. +very differently sized panel items. Consider using the \helpref{sizers}{sizeroverview} instead. \subsection{Use wxWidgets resource files}\label{useresources} Use .xrc (wxWidgets resource files) where possible, because they can be easily changed -independently of source code. +independently of source code. See the \helpref{XRC overview}{xrcoverview} for more info. \section{Strategies for debugging}\label{debugstrategies} @@ -645,7 +622,7 @@ of debugging code, or you wish to print a bunch of variables). \subsection{Use the wxWidgets debugging facilities}\label{usedebuggingfacilities} -You can use wxDebugContext to check for +You can use \helpref{wxDebugContext}{wxdebugcontext} to check for memory leaks and corrupt memory: in fact in debugging mode, wxWidgets will automatically check for memory leaks at the end of the program if wxWidgets is suitably configured. Depending on the operating system and compiler, more or less diff --git a/docs/latex/wx/libs.tex b/docs/latex/wx/libs.tex index a25e2434b8..66196dba9f 100644 --- a/docs/latex/wx/libs.tex +++ b/docs/latex/wx/libs.tex @@ -2,7 +2,7 @@ \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% \setfooter{\thepage}{}{}{}{}{\thepage}% -Starting from version 2.5.0 wxWidgets can be built either as a single large +wxWidgets can be built either as a single large library (this is called the {\it monolithic build}) or as several smaller libraries ({\it multilib build}). Multilib build is the default. @@ -13,10 +13,6 @@ diagram show dependencies between them: \image{}{libs.gif} \end{center} -{\large {\bf wxAui}} - -This contains the Advanced User Interface docking library. - {\large {\bf wxBase}} Every wxWidgets application must link against this library. It contains @@ -26,6 +22,18 @@ differences between platforms. wxBase can be used to develop console mode applications, it does not require any GUI libraries or running X Window System on Unix. +{\large {\bf wxCore}} + +Basic GUI classes such as GDI classes or controls are in this library. All +wxWidgets GUI applications must link against this library, only console mode +applications don't. + +{\large {\bf wxAui}} + +This contains the Advanced User Interface docking library. + +Requires wxHTML, wxAdvanced, wxCore, wxBase, wxXML. + {\large {\bf wxNet}} Classes for network access: @@ -40,34 +48,28 @@ Classes for network access: \helpref{wxTCPConnection}{wxddeconnection}) } \item{ \helpref{wxURL}{wxurl} } \item{ wxInternetFSHandler (a \helpref{wxFileSystem handler}{fs}) } -Requires wxBase. \end{itemize} +Requires wxBase. + {\large {\bf wxRichText}} This contains generic rich text control functionality. +Requires wxAdvanced, wxHTML, wxCore, wxXML, wxBase. + {\large {\bf wxXML}} -This library contains simple classes for parsing XML documents. Note that -their API {\em will} change in the future and backward -compatibility will not be preserved. Use of this library in your applications -is not recommended, it is only meant for use by XML resources system. Future -versions of wxWidgets will contain new XML handling classes with DOM-like API. +This library contains simple classes for parsing XML documents. + Requires wxBase. -{\large {\bf wxCore}} - -Basic GUI classes such as GDI classes or controls are in this library. All -wxWidgets GUI applications must link against this library, only console mode -applications don't. - {\large {\bf wxAdvanced}} Advanced or rarely used GUI classes: \begin{itemize}\itemsep=0pt -\item{ wxBufferedDC } +\item{ \helpref{wxBufferedDC}{wxbuffereddc} } \item{ \helpref{wxCalendarCtrl}{wxcalendarctrl} } \item{ \helpref{wxGrid classes}{gridoverview} } \item{ \helpref{wxJoystick}{wxjoystick} } @@ -78,6 +80,7 @@ Advanced or rarely used GUI classes: \item{ \helpref{wxWizard}{wxwizard} } \item{ \helpref{wxSashLayoutWindow}{wxsashlayoutwindow} } \item{ \helpref{wxSashWindow}{wxsashwindow} } +\item{ ...others } \end{itemize} Requires wxCore and wxBase. @@ -95,6 +98,7 @@ Requires wxCore and wxBase. This library contains \helpref{wxGLCanvas}{wxglcanvas} class for integrating OpenGL library with wxWidgets. Unlike all others, this library is {\em not} part of the monolithic library, it is always built as separate library. + Requires wxCore and wxBase. {\large {\bf wxHTML}} @@ -103,7 +107,9 @@ Simple HTML renderer and other \helpref{HTML rendering classes}{wxhtml} are contained in this library, as well as \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}, \helpref{wxBestHelpController}{wxhelpcontroller} and - \helpref{wxHtmlListBox}{wxhtmllistbox}. Requires wxCore and wxBase. + \helpref{wxHtmlListBox}{wxhtmllistbox}. + +Requires wxCore and wxBase. {\large {\bf wxODBC}} @@ -121,11 +127,18 @@ Requires wxCore, wxBase and wxXML. \helpref{wxDbGridTableBase}{wxdbgridtablebase} class which combines \helpref{wxGrid}{wxgrid} and \helpref{wxDbTable}{wxdbtable}. + Requires wxODBC and wxAdvanced. {\large {\bf wxXRC}} This library contains \helpref{wxXmlResource}{wxxmlresource} class that -provides access to XML resource files in XRC format. +provides access to XML resource files in XRC format + Requires wxXML, wxCore, wxAdvanced and wxHTML. +{\large {\bf wxSTC}} + +STC (Styled Text Control) is a wrapper around Scintilla, a syntax-highlighting text editor. + +Requires wxCore, wxBase. diff --git a/docs/latex/wx/portnote.tex b/docs/latex/wx/portnote.tex index a603df90f2..3e71a18bdb 100644 --- a/docs/latex/wx/portnote.tex +++ b/docs/latex/wx/portnote.tex @@ -16,3 +16,18 @@ requires. This chapter collects notes about differences among supported platform \input wxmgl.tex \input wxx11.tex +\subsection{Documentation for the native toolkits}\label{nativedocs} + +It's sometimes useful to interface directly with the underlying toolkit +used by wxWidgets to e.g. use toolkit-specific features. +In such case (or when you want to e.g. write a port-specific patch) it can be +necessary to use the underlying toolkit API directly: + +\begin{description}\itemsep=0pt +\item[{\bf wxMSW}] +wxMSW port uses win32 API: \urlref{MSDN docs}{http://msdn2.microsoft.com/en-us/library/ms649779.aspx} + +\item[{\bf wxGTK}] +wxGTK port uses GTK+: \urlref{GTK+ 2.x docs}{http://developer.gnome.org/doc/API/2.0/gtk/index.html} + +\end{description} \ No newline at end of file