From 66f55ec64c250fc51147815bf905a86e943bfd16 Mon Sep 17 00:00:00 2001
From: Julian Smart <julian@anthemion.co.uk>
Date: Fri, 10 Mar 2000 16:06:33 +0000
Subject: [PATCH] Doc corrections, wxMotif toolbar AddControl implementation
 (untested as yet)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 contrib/samples/ogl/studio/studio.cpp |  8 +++++
 distrib/msw/generic.rsp               |  1 +
 docs/html/index.htm                   |  7 ++++
 docs/latex/wx/datetime.tex            | 50 +++++++++++++--------------
 docs/latex/wx/glcanvas.tex            |  3 +-
 docs/latex/wx/longlong.tex            |  3 +-
 docs/latex/wx/manual.tex              |  3 +-
 docs/latex/wx/process.tex             |  9 ++---
 docs/latex/wx/tsamples.tex            |  2 +-
 docs/latex/wx/wnddisbl.tex            |  1 +
 docs/latex/wx/wx.hpj                  |  6 ++--
 src/motif/toolbar.cpp                 | 10 ++++--
 12 files changed, 64 insertions(+), 39 deletions(-)

diff --git a/contrib/samples/ogl/studio/studio.cpp b/contrib/samples/ogl/studio/studio.cpp
index 18dd46d166..3a08a9be01 100644
--- a/contrib/samples/ogl/studio/studio.cpp
+++ b/contrib/samples/ogl/studio/studio.cpp
@@ -447,6 +447,10 @@ void csApp::CreateDiagramToolBar(wxFrame* parent)
         "", wxPoint(controlX, 1), wxSize(pointSizeW, pointSizeH), maxPointSize, pointSizes);
     delete[] pointSizes;
 
+#ifdef __WXGTK__
+    m_diagramToolBar->AddControl(m_pointSizeComboBox);
+#endif
+
     m_pointSizeComboBox->SetSelection(10 - 1);
 
     // Create a combobox for zooming
@@ -466,6 +470,10 @@ void csApp::CreateDiagramToolBar(wxFrame* parent)
         "", wxPoint(controlX, 1), wxSize(zoomW, zoomH), noStrings, zoomStrings);
     delete[] zoomStrings;
 
+#ifdef __WXGTK__
+    m_diagramToolBar->AddControl(m_zoomComboBox);
+#endif
+
     // i = (zoom - minZoom)/increment
     // index = noStrings - i - 1
     // 100%
diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp
index 2d8f2d3a64..ed0349a7ea 100644
--- a/distrib/msw/generic.rsp
+++ b/distrib/msw/generic.rsp
@@ -59,6 +59,7 @@ docs/html/*.png
 docs/html/icons/*.gif
 docs/html/icons/*.png
 docs/html/icons/*.jpg
+docs/tech/*.txt
 
 src/makeenvs/*.env
 src/make.env
diff --git a/docs/html/index.htm b/docs/html/index.htm
index 12c5bb5618..35800afd73 100644
--- a/docs/html/index.htm
+++ b/docs/html/index.htm
@@ -33,6 +33,7 @@ downloaded from the <a href="http://www.wxwindows.org">wxWindows Web site</a>.<P
 <FONT size=-1>
 [<a href="#install">Install</a>]
 [<a href="#manuals">Manuals</a>]
+[<a href="#technotes">Technical Notes</a>]
 [<a href="#thirdparty">3rd party tools</a>] 
 [<a href="#samples">Samples</a>]
 [<a href="#demos">Demos</a>]
@@ -132,6 +133,12 @@ downloaded from the <a href="http://www.wxwindows.org">wxWindows Web site</a>.<P
 
 </table>
 
+<h3 align=center><a name="technotes"><hr>Technical notes<hr></a></h3>
+
+<ul>
+<li><a href="tech/index.txt">Index of technical notes</a>
+<li><a href="tech/">Technical notes</a> in text form
+</ul>
 
 <h3 align=center><a name="thirdparty"><hr>Third-party tools<hr></a></h3>
 
diff --git a/docs/latex/wx/datetime.tex b/docs/latex/wx/datetime.tex
index 6a4864816d..cad3676d56 100644
--- a/docs/latex/wx/datetime.tex
+++ b/docs/latex/wx/datetime.tex
@@ -20,14 +20,14 @@ to contain the number of years, hours, minutes, seconds and milliseconds.
 
 \wxheading{Constants}
 
-Global constant {\tt wxDefaultDateTime} and synonym for it {\tt
-wxInvalidDateTime} are defined. This constant will be different from any valid
+Global constant {\tt wxDefaultDateTime} and synonym for it {\tt wxInvalidDateTime} are defined. This constant will be different from any valid
 wxDateTime object.
 
 All the following constants are defined inside wxDateTime class (i.e., to refer to
 them you should prepend their names with {\tt wxDateTime::}).
 
-Time zone symbolic names:\label{wxdatetimetimezones}
+Time zone symbolic names:%\label{wxdatetimetimezones} % Sorry, labels not allowed here.
+
 
 \begin{verbatim}
     enum TZ
@@ -107,9 +107,9 @@ No base class
 
 \wxheading{See also}
 
-\helpref{Date classes overview}{wxdatetimeoverview},\rtfsp
-\helpref{wxTimeSpan}{wxtimespan},\rtfsp
-\helpref{wxDateSpan}{wxdatespan},\rtfsp
+%\helpref{Date classes overview}{wxdatetimeoverview},\rtfsp
+wxTimeSpan,\rtfsp
+wxDateSpan,\rtfsp
 \helpref{wxCalendarCtrl}{wxcalendarctrl}
 
 \latexignore{\rtfignore{\wxheading{Function groups}}}
@@ -162,9 +162,9 @@ calendar-related actions.
 
 }}
 
-\membersection{wxDateTime::ConvertYearToBC}{wxdatetimeconvertyeartobc}
+\membersection{wxDateTime::ConvertYearToBC}\label{wxdatetimeconvertyeartobc}
 
-\func{static int}{ConvertYearToBC}(int year);
+\func{static int}{ConvertYearToBC}{\param{int }{year}}
 
 Converts the year in absolute notation (i.e. a number which can be negative,
 positive or zero) to the year in BC/AD notation. For the positive years,
@@ -179,71 +179,69 @@ This function should be used like this:
     printf("The year is %d%s", wxDateTime::ConvertYearToBC(y), y > 0 ? "AD" : "BC");
 \end{verbatim}
 
-\membersection{wxDateTime::GetAmPmStrings}{wxdatetimegetampmstrings}
+\membersection{wxDateTime::GetAmPmStrings}\label{wxdatetimegetampmstrings}
 
 \func{static void}{GetAmPmStrings}{\param{wxString *}{am}, \param{wxString *}{pm}}
 
-\membersection{wxDateTime::GetBeginDST}{wxdatetimegetbegindst}
+\membersection{wxDateTime::GetBeginDST}\label{wxdatetimegetbegindst}
 
 \func{static wxDateTime}{GetBeginDST}{\param{int }{year = Inv\_Year}, \param{Country }{country = Country\_Default}}
 
-\membersection{wxDateTime::GetCountry}{wxdatetimegetcountry}
+\membersection{wxDateTime::GetCountry}\label{wxdatetimegetcountry}
 
 \func{static Country}{GetCountry}{\void}
 
-\membersection{wxDateTime::GetCurrentYear}{wxdatetimegetcurrentyear}
+\membersection{wxDateTime::GetCurrentYear}\label{wxdatetimegetcurrentyear}
 
 \func{static int}{GetCurrentYear}{\param{Calendar }{cal = Gregorian}}
 
-\membersection{wxDateTime::GetCurrentMonth}{wxdatetimegetcurrentmonth}
+\membersection{wxDateTime::GetCurrentMonth}\label{wxdatetimegetcurrentmonth}
 
 \func{static Month}{GetCurrentMonth}{\param{Calendar }{cal = Gregorian}}
 
-\membersection{wxDateTime::GetCentury}{wxdatetimegetcentury}
+\membersection{wxDateTime::GetCentury}\label{wxdatetimegetcentury}
 
 \func{static int}{GetCentury}{\param{int }{year = Inv\_Year}}
 
-\membersection{wxDateTime::GetEndDST}{wxdatetimegetenddst}
+\membersection{wxDateTime::GetEndDST}\label{wxdatetimegetenddst}
 
 \func{static wxDateTime}{GetEndDST}{\param{int }{year = Inv\_Year}, \param{Country }{country = Country\_Default}}
 
-\membersection{wxDateTime::GetMonthName}{wxdatetimegetmonthname}
+\membersection{wxDateTime::GetMonthName}\label{wxdatetimegetmonthname}
 
 \func{static wxString}{GetMonthName}{\param{Month }{month}, \param{NameFlags }{flags = Name\_Full}}
 
-\membersection{wxDateTime::GetNumberOfDays}{wxdatetimegetnumberofdays}
+\membersection{wxDateTime::GetNumberOfDays}\label{wxdatetimegetnumberofdays}
 
 \func{static wxDateTime\_t}{GetNumberOfDays}{\param{int }{year}, \param{Calendar }{cal = Gregorian}}
 
-\membersection{wxDateTime::GetNumberOfDays}{wxdatetimegetnumberofdays}
-
 \func{static wxDateTime\_t}{GetNumberOfDays}{\param{Month }{month}, \param{int }{year = Inv\_Year}, \param{Calendar }{cal = Gregorian}}
 
-\membersection{wxDateTime::GetWeekDayName}{wxdatetimegetweekdayname}
+\membersection{wxDateTime::GetWeekDayName}\label{wxdatetimegetweekdayname}
 
 \func{static wxString}{GetWeekDayName}{\param{WeekDay }{weekday}, \param{NameFlags }{flags = Name\_Full}}
 
-\membersection{wxDateTime::IsLeapYear}{wxdatetimeisleapyear}
+\membersection{wxDateTime::IsLeapYear}\label{wxdatetimeisleapyear}
 
 \func{static bool}{IsLeapYear}{\param{int }{year = Inv\_Year}, \param{Calendar }{cal = Gregorian}}
 
-\membersection{wxDateTime::IsWestEuropeanCountry}{wxdatetimeiswesteuropeancountry}
+\membersection{wxDateTime::IsWestEuropeanCountry}\label{wxdatetimeiswesteuropeancountry}
 
 \func{static bool}{IsWestEuropeanCountry}{\param{Country }{country = Country\_Default}}
 
-\membersection{wxDateTime::IsDSTApplicable}{wxdatetimeisdstapplicable}
+\membersection{wxDateTime::IsDSTApplicable}\label{wxdatetimeisdstapplicable}
 
 \func{static bool}{IsDSTApplicable}{\param{int }{year = Inv\_Year}, \param{Country }{country = Country\_Default}}
 
-\membersection{wxDateTime::Now}{wxdatetimenow}
+\membersection{wxDateTime::Now}\label{wxdatetimenow}
 
 \func{static wxDateTime}{Now}{\void}
 
-\membersection{wxDateTime::SetCountry}{wxdatetimesetcountry}
+\membersection{wxDateTime::SetCountry}\label{wxdatetimesetcountry}
 
 \func{static void}{SetCountry}{\param{Country }{country}}
 
-\membersection{wxDateTime::Today}{wxdatetimetoday}
+\membersection{wxDateTime::Today}\label{wxdatetimetoday}
 
 \func{static wxDateTime}{Today}{\void}
 
diff --git a/docs/latex/wx/glcanvas.tex b/docs/latex/wx/glcanvas.tex
index fddb1541ee..11a0553012 100644
--- a/docs/latex/wx/glcanvas.tex
+++ b/docs/latex/wx/glcanvas.tex
@@ -10,7 +10,8 @@ to show the OpenGL buffer on the window.
 Please note that despite deriving from wxScrolledWindow, scrolling is not enabled for this class under
 Windows.
 
-To switch wxGLCanvas support on under Windows, edit setup.h and set wxUSE\_GLCANVAS to 1.
+To switch wxGLCanvas support on under Windows, edit setup.h and set wxUSE\_GLCANVAS to 1. On Unix,
+pass --with-opengl to configure to compile using OpenGL or Mesa.
 
 \wxheading{Derived from}
 
diff --git a/docs/latex/wx/longlong.tex b/docs/latex/wx/longlong.tex
index 8e753cab32..a37cff3edd 100644
--- a/docs/latex/wx/longlong.tex
+++ b/docs/latex/wx/longlong.tex
@@ -153,5 +153,6 @@ Substracts another wxLongLong from this one.
 
 Pre/post decrement operator.
 
-% TODO document all other arithmetics operations: shitfs, multiplication,
+% TODO document all other arithmetics operations: shifts, multiplication,
 % division, bitwise, comparison
+
diff --git a/docs/latex/wx/manual.tex b/docs/latex/wx/manual.tex
index 10dc13b4dd..b8e445a1a2 100644
--- a/docs/latex/wx/manual.tex
+++ b/docs/latex/wx/manual.tex
@@ -672,11 +672,12 @@ That's all there is to it!
 \nocite{smart95a}%
 \nocite{smart95b}%
 
+\end{comment}
+
 \bibliography{refs}
 \addcontentsline{toc}{chapter}{Bibliography}
 \setheader{{\it REFERENCES}}{}{}{}{}{{\it REFERENCES}}%
 \setfooter{\thepage}{}{}{}{}{\thepage}%
-\end{comment}
 
 \newpage
 % Note: In RTF, the \printindex must come before the
diff --git a/docs/latex/wx/process.tex b/docs/latex/wx/process.tex
index 8a15c8f363..4aa9a8df23 100644
--- a/docs/latex/wx/process.tex
+++ b/docs/latex/wx/process.tex
@@ -66,15 +66,15 @@ notification.
 
 \constfunc{wxInputStream* }{GetInputStream}{\void}
 
-It returns a input stream correspoding to the output stream of the subprocess.
+It returns a output stream corresponding to the input stream of the subprocess. 
 If it is NULL, you have not turned on the redirection.
 See \helpref{wxProcess::Redirect}{wxprocessredirect}.
 
-\membersection{wxProcess::GetInputStream}\label{wxprocessgetinputstream}
+\membersection{wxProcess::GetOutputStream}\label{wxprocessgetoutputstream}
 
-\constfunc{wxInputStream* }{GetInputStream}{\void}
+\constfunc{wxOutputStream* }{GetOutputStream}{\void}
 
-It returns a output stream corresponding to the input stream of the subprocess. 
+It returns an output stream correspoding to the output stream of the subprocess.
 If it is NULL, you have not turned on the redirection.
 See \helpref{wxProcess::Redirect}{wxprocessredirect}.
 
@@ -97,3 +97,4 @@ It turns on the redirection, wxExecute will try to open a couple of pipes
 to catch the subprocess stdio. The caught input stream is returned by
 GetOutputStream() as a non-seekable stream. The caught output stream is returned
 by GetInputStream() as a non-seekable stream.
+
diff --git a/docs/latex/wx/tsamples.tex b/docs/latex/wx/tsamples.tex
index dc27d24dfc..349e3595e6 100644
--- a/docs/latex/wx/tsamples.tex
+++ b/docs/latex/wx/tsamples.tex
@@ -297,7 +297,7 @@ up an event handler to be notified of incoming connection requests
 in the socket parlance) for clients. For each incoming client, a new
 \helpref{wxSocketBase}{wxsocketbase} object is created, which represents
 the connection. Connections are independent from the server that created
-them, so they set up their own event handler, and stay awaiting for
+them, so they set up their own event handler, and stay awaiting for 
 {\bf wxSOCKET\_INPUT} (incoming data) or {\bf wxSOCKET\_LOST} (connection
 closed at the remote end) events. This event handler is the same for all
 connections, and demonstrates how to determine which socket the event
diff --git a/docs/latex/wx/wnddisbl.tex b/docs/latex/wx/wnddisbl.tex
index 43a92d3da7..efd93453b4 100644
--- a/docs/latex/wx/wnddisbl.tex
+++ b/docs/latex/wx/wnddisbl.tex
@@ -40,3 +40,4 @@ Disables all top level windows of the applications with the exception of
 \membersection{wxWindowDisabler::\destruct{wxWindowDisabler}}
 
 Reenables back the windows disabled by the constructor.
+
diff --git a/docs/latex/wx/wx.hpj b/docs/latex/wx/wx.hpj
index b8f8205dae..43d8c37176 100644
--- a/docs/latex/wx/wx.hpj
+++ b/docs/latex/wx/wx.hpj
@@ -1,14 +1,14 @@
 [OPTIONS]
-BMROOT=L:\wxWindows\docs\latex\wx ; Assume that bitmaps are where the source is
+BMROOT=d:\wx2\wxWindows\docs\latex\wx ; Assume that bitmaps are where the source is
 TITLE=wxWindows Manual
 CONTENTS=Contents
 COMPRESS=HIGH
 
 [FILES]
-Wx.rtf
+wx.rtf
 
 [CONFIG]
-CreateButton("Up", "&Up", "JumpId(`Wx.hlp', `Contents')")
+CreateButton("Up", "&Up", "JumpId(`wx.hlp', `Contents')")
 BrowseButtons()
 
 [MAP]
diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp
index fec5196fb1..9a79f005ba 100644
--- a/src/motif/toolbar.cpp
+++ b/src/motif/toolbar.cpp
@@ -251,6 +251,7 @@ bool wxToolBar::Realize()
     // Separator spacing
     const int separatorSize = GetToolSeparation(); // 8;
     wxSize margins = GetToolMargins();
+    wxSize packing = GetToolPacking();
     int marginX = margins.x;
     int marginY = margins.y;
 
@@ -273,7 +274,12 @@ bool wxToolBar::Realize()
         switch ( tool->GetStyle() )
         {
             case wxTOOL_STYLE_CONTROL:
-                wxFAIL_MSG( _T("not implemented") );
+                wxControl* control = tool->GetControl();
+                wxSize sz = control->GetSize();
+                wxSize pos = control->GetPosition();
+                control->Move(currentX, pos.y);
+                currentX += sz.x + packing.x;
+
                 break;
 
             case wxTOOL_STYLE_SEPARATOR:
@@ -441,7 +447,7 @@ bool wxToolBar::Realize()
                                   XmNwidth, &width,
                                   XmNheight, & height,
                                   NULL);
-                    currentX += width + marginX;
+                    currentX += width + packing.x;
                     buttonHeight = wxMax(buttonHeight, height);
                 }
 
-- 
2.45.2

