From 7b28757f5e64bac68d9b159240616fc4d9ad66bc Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 9 Mar 2000 20:15:44 +0000 Subject: [PATCH] Mmedia, OGL lib directory changes; omitted naughty wxGA_SMOOTH style from wxProgressDialog; wxMotif toolbar fix; ~wxWindow Motif fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/samples/mmedia/Makefile.in | 5 +- contrib/samples/ogl/ogledit/Makefile | 2 +- contrib/samples/ogl/studio/Makefile | 2 +- contrib/samples/ogl/studio/studio.cpp | 2 +- contrib/src/ogl/Makefile.in | 2 +- distrib/msw/generic.rsp | 76 ++++--------------- distrib/msw/makefile.rsp | 9 ++- distrib/msw/tex2rtf.rsp | 1 + docs/html/index.htm | 5 +- docs/latex/wx/helpinst.tex | 105 ++++++++++++++++---------- docs/latex/wx/hthelpct.tex | 26 +++---- docs/latex/wx/hthlpdat.tex | 8 +- docs/latex/wx/hthlpfrm.tex | 9 +-- include/wx/defs.h | 2 + samples/help/demo.cpp | 86 +++++++++++++++++++-- samples/help/demo.rc | 5 +- samples/help/tex2rtf.ini | 1 + src/generic/helpwxht.cpp | 7 ++ src/generic/progdlgg.cpp | 6 +- src/motif/toolbar.cpp | 6 ++ src/motif/window.cpp | 3 + 21 files changed, 217 insertions(+), 151 deletions(-) diff --git a/contrib/samples/mmedia/Makefile.in b/contrib/samples/mmedia/Makefile.in index 4ab3991589..89cda4ba15 100644 --- a/contrib/samples/mmedia/Makefile.in +++ b/contrib/samples/mmedia/Makefile.in @@ -17,7 +17,7 @@ PROGRAM=mmboard OBJECTS=mmboard.o mmbman.o -EXTRA_LIBS= $(top_builddir)/lib/libwxmmedia2.a @ESD_LIBS@ +EXTRA_LIBS= $(top_builddir)/contrib/lib/libmmedia.a @ESD_LIBS@ # the comment at the end of the next line is needed because otherwise autoconf # would remove this line completely - it contains a built-in hack to remove # any VPATH assignment not containing ':' @@ -32,5 +32,8 @@ include ../../../src/make.env all: $(PROGRAM) +clean: + rm -f *.o $(PROGRAM) + mmboard: $(OBJECTS) $(CC) $(LDFLAGS) -o mmboard $(OBJECTS) $(EXTRA_LIBS) $(LDLIBS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ diff --git a/contrib/samples/ogl/ogledit/Makefile b/contrib/samples/ogl/ogledit/Makefile index fea80d0d22..05f8941929 100644 --- a/contrib/samples/ogl/ogledit/Makefile +++ b/contrib/samples/ogl/ogledit/Makefile @@ -12,7 +12,7 @@ # on your system. # -CPP = gcc +CPP = gcc -g CC = gcc WXCONFIG=../../../../wx-config WXINCLUDE=-I../../../../include -I../../../include diff --git a/contrib/samples/ogl/studio/Makefile b/contrib/samples/ogl/studio/Makefile index 7e33fc1f49..e94f1378c4 100644 --- a/contrib/samples/ogl/studio/Makefile +++ b/contrib/samples/ogl/studio/Makefile @@ -12,7 +12,7 @@ # on your system. # -CPP = gcc +CPP = gcc -g CC = gcc WXCONFIG=../../../../wx-config WXINCLUDE=-I../../../../include -I../../../include diff --git a/contrib/samples/ogl/studio/studio.cpp b/contrib/samples/ogl/studio/studio.cpp index d8ca7a8890..18dd46d166 100644 --- a/contrib/samples/ogl/studio/studio.cpp +++ b/contrib/samples/ogl/studio/studio.cpp @@ -436,7 +436,7 @@ void csApp::CreateDiagramToolBar(wxFrame* parent) int zoomW = 60; int zoomH = 18; #ifdef __WXMOTIF__ - controlX += 70; + controlX += 75; pointSizeW = 60; pointSizeH = 22; zoomW = 60; diff --git a/contrib/src/ogl/Makefile.in b/contrib/src/ogl/Makefile.in index d335435b44..6e78aa42a7 100644 --- a/contrib/src/ogl/Makefile.in +++ b/contrib/src/ogl/Makefile.in @@ -5,7 +5,7 @@ top_builddir = ../../.. VPATH= $(top_srcdir)/ogl -LIBTARGET=$(top_builddir)/lib/libogl +LIBTARGET=$(top_builddir)/contrib/lib/libogl OBJECTS=basic.o bmpshape.o composit.o divided.o lines.o misc.o \ basic2.o canvas.o constrnt.o drawn.o mfutils.o ogldiag.o diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp index bad4201992..2d8f2d3a64 100644 --- a/distrib/msw/generic.rsp +++ b/distrib/msw/generic.rsp @@ -152,66 +152,7 @@ utils/make*.* utils/configure utils/configure.in -utils/wxgraph/src/*.cpp -utils/wxgraph/src/*.c -utils/wxgraph/src/*.h -utils/wxgraph/src/makefile* -utils/wxgraph/src/*.xbm -utils/wxgraph/src/*.xpm -utils/wxgraph/lib/dummy -utils/wxgraph/src/*.ico -utils/wxgraph/src/*.def -utils/wxgraph/src/*.rc - -utils/rcparser/src/*.cpp -utils/rcparser/src/*.c -utils/rcparser/src/*.h -utils/rcparser/src/makefile* -utils/rcparser/src/*.xbm -utils/rcparser/src/*.xpm -utils/rcparser/lib/dummy -utils/rcparser/src/*.ico -utils/rcparser/src/*.def -utils/rcparser/src/*.rc -utils/rcparser/src/*.rh - -utils/colours/*.h -utils/colours/*.cpp -utils/colours/*.def -utils/colours/*.rc -utils/colours/makefile* -utils/colours/*.xbm -utils/colours/*.xpm -utils/colours/*.txt - -utils/serialize/*.h -utils/serialize/*.cpp -utils/serialize/*.def -utils/serialize/*.rc -utils/serialize/makefile* -utils/serialize/*.xbm -utils/serialize/*.xpm -utils/serialize/*.txt - -utils/hhp2cache/*.h -utils/hhp2cache/*.cpp -utils/hhp2cache/*.def -utils/hhp2cache/*.rc -utils/hhp2cache/makefile* -utils/hhp2cache/*.xbm -utils/hhp2cache/*.xpm -utils/hhp2cache/*.txt - -utils/makegen/*.h -utils/makegen/*.cpp -utils/makegen/*.def -utils/makegen/*.rc -utils/makegen/makefile* -utils/makegen/*.xbm -utils/makegen/*.xpm -utils/makegen/*.txt -utils/makegen/templates/make* - +utils/dialoged/Makefile.in utils/dialoged/src/bitmaps/*.xbm utils/dialoged/src/bitmaps/*.xpm utils/dialoged/src/*.h @@ -238,8 +179,18 @@ utils/dialoged/test/*.ico utils/dialoged/test/*.prj utils/dialoged/test/*.bmp +utils/hhp2cache/*.h +utils/hhp2cache/*.cpp +utils/hhp2cache/*.def +utils/hhp2cache/*.rc +utils/hhp2cache/makefile* +utils/hhp2cache/*.xbm +utils/hhp2cache/*.xpm +utils/hhp2cache/*.txt + contrib/configure contrib/configure.in +contrib/lib/dummy contrib/include/wx/mmedia/*.h contrib/include/wx/mmedia/internal/*.h @@ -328,6 +279,8 @@ samples/help/*.bmp samples/help/*.rc samples/help/*.hlp samples/help/*.cnt +samples/help/*.zip +samples/help/*.htb samples/help/*.hpj samples/help/*.tex samples/help/*.ini @@ -1069,7 +1022,6 @@ samples/opengl/cube/*.rc samples/opengl/cube/*.ico samples/opengl/cube/*.xbm samples/opengl/cube/make*.* -samples/opengl/cube/Makefile samples/opengl/isosurf/*.cpp samples/opengl/isosurf/*.h @@ -1078,7 +1030,6 @@ samples/opengl/isosurf/*.ico samples/opengl/isosurf/*.xbm samples/opengl/isosurf/*.dat.gz samples/opengl/isosurf/make*.* -samples/opengl/isosurf/Makefile samples/opengl/penguin/*.cpp samples/opengl/penguin/*.c @@ -1088,7 +1039,6 @@ samples/opengl/penguin/*.ico samples/opengl/penguin/*.xbm samples/opengl/penguin/*.xpm samples/opengl/penguin/make*.* -samples/opengl/penguin/Makefile samples/opengl/penguin/penguin.lwo demos/makefile* diff --git a/distrib/msw/makefile.rsp b/distrib/msw/makefile.rsp index 03a58c081e..d0f024afec 100644 --- a/distrib/msw/makefile.rsp +++ b/distrib/msw/makefile.rsp @@ -54,6 +54,7 @@ samples/dialup/Makefile.in samples/font/Makefile.in samples/menu/Makefile.in samples/treelay/Makefile.in +samples/opengl/Makefile.in samples/opengl/cube/Makefile.in samples/opengl/penguin/Makefile.in samples/opengl/isosurf/Makefile.in @@ -62,16 +63,16 @@ demos/forty/Makefile.in demos/fractal/Makefile.in demos/poem/Makefile.in demos/life/Makefile.in -utils/HelpGen/Makefile.in -utils/tex2rtf/Makefile.in -utils/tex2rtf/src/Makefile.in utils/dialoged/Makefile.in utils/dialoged/src/Makefile.in -utils/hhp2cached/Makefile.in utils/Makefile.in +utils/hhp2cached/Makefile.in contrib/Makefile.in +contrib/src/Makefile.in contrib/src/ogl/Makefile.in contrib/src/mmedia/Makefile.in +contrib/samples/Makefile.in +contrib/samples/ogl/Makefile.in contrib/samples/ogl/ogledit/Makefile.in contrib/samples/ogl/studio/Makefile.in contrib/samples/mmedia/Makefile.in diff --git a/distrib/msw/tex2rtf.rsp b/distrib/msw/tex2rtf.rsp index 5f531b87f0..536d55564c 100644 --- a/distrib/msw/tex2rtf.rsp +++ b/distrib/msw/tex2rtf.rsp @@ -1,3 +1,4 @@ +utils/tex2rtf/Makefile.in utils/tex2rtf/src/*.cpp utils/tex2rtf/src/*.h utils/tex2rtf/src/make*.* diff --git a/docs/html/index.htm b/docs/html/index.htm index f11549ac1f..12c5bb5618 100644 --- a/docs/html/index.htm +++ b/docs/html/index.htm @@ -163,10 +163,12 @@ to switch between compilation modes.
  • dialogs: shows some of the common dialogs available -- wxFontDialog, wxColourDialog, wxFileDialog, wxDirDialog, wxMessageBox, wxTextEntryDialog, wxSingleChoiceDialog. For printing-related dialogs, see the printing sample. +
  • dragimag: wxDragImage demo. +
  • dialup: wxDialUpManager demo.
  • dnd: demonstrates drag and drop on supported platforms.
  • docview: demonstrates use of the document view classes, using wxFrame. -
  • docvwmdi: : demonstrates use of the document view classes, +
  • docvwmdi: demonstrates use of the document view classes, using wxMDIParentFrame, wxMDIChildFrame.
  • drawing: tests device context drawing.
  • dynamic: shows how to connect events to member functions @@ -206,7 +208,6 @@ platforms that don't support it, a normal-sized title bar is displayed. small a wxWindows application as you can get.
  • nativdlg: shows how wxWindows can load a standard Windows dialog resource, translating the controls into wxWindows controls (Windows only). -
  • dialup: wxDialUpManager demo.
  • newgrid: demonstrates the new wxGrid implementation, by Michael Bedward.
  • notebook: shows the wxNotebook (tabbed window) control.
  • oleauto: a little OLE automation controller (Windows only; requires diff --git a/docs/latex/wx/helpinst.tex b/docs/latex/wx/helpinst.tex index ae62551e17..c645e06d26 100644 --- a/docs/latex/wx/helpinst.tex +++ b/docs/latex/wx/helpinst.tex @@ -38,8 +38,7 @@ is reasonably close to the wxWindows help controller API; see {\tt wx/helpwxht.h details of use. \item \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}, a more sophisticated help controller using \helpref{wxHTML}{wxhtml}, in a similar style to the Windows HTML Help viewer and using some of the same files. -The API is not the same as the standard API, which is why it is documented separately. -\item wxXLPHelpController, for controlling wxHelp (from wxWindows 1). Obsolete. +%The API is not the same as the standard API, which is why it is documented separately. \end{itemize} \wxheading{Derived from} @@ -54,7 +53,7 @@ wxHelpControllerBase\\ (Windows Help controller)\\ (external HTML browser controller) (wxHTML based help controller) - (wxHelp controller) + (Advanced wxHTML based help controller: wxHtmlHelpController) \wxheading{See also} @@ -85,7 +84,11 @@ number if using wxHelp. Does not invoke the help viewer. This must be called directly after the help instance object is created and before any attempts to communicate with the viewer. -You may omit the file extension and a suitable one will be chosen. +You may omit the file extension and a suitable one will be chosen. For +wxHtmlHelpController, the extensions zip, htb and hhp will be appended while searching for +a suitable file. For WinHelp, the hlp extension is appended. For wxHelpControllerHtml (the +standard HTML help controller), the filename is assumed to be a directory containing +the HTML files. \membersection{wxHelpController::DisplayBlock}\label{wxhelpcontrollerdisplayblock} @@ -93,12 +96,12 @@ You may omit the file extension and a suitable one will be chosen. If the help viewer is not running, runs it and displays the file at the given block number. -{\it wxHelp:} this is the wxHelp block number. - {\it WinHelp:} Refers to the context number. {\it External HTML help:} the same as for \helpref{wxHelpController::DisplaySection}{wxhelpcontrollerdisplaysection}. +{\it wxHtmlHelpController:} {\it sectionNo} is an identifier as specified in the {\tt .hhc} file. See \helpref{Help files format}{helpformat}. + \membersection{wxHelpController::DisplayContents}\label{wxhelpcontrollerdisplaycontents} \func{virtual bool}{DisplayContents}{\void} @@ -112,8 +115,6 @@ contents. If the help viewer is not running, runs it and displays the given section. -{\it wxHelp:} Sections are numbered starting from 1. Section numbers may be viewed by running wxHelp in edit mode. - {\it WinHelp:} {\it sectionNo} is a context id. {\it External HTML help/wxHTML based help:} wxExtHelpController and wxHelpControllerHtml implement {\it sectionNo} as an id in a map file, which is of the form: @@ -124,6 +125,33 @@ If the help viewer is not running, runs it and displays the given section. 2 wx204.html ; Function reference \end{verbatim} +{\it wxHtmlHelpController:} {\it sectionNo} is an identifier as specified in the {\tt .hhc} file. See \helpref{Help files format}{helpformat}. + +\membersection{wxHelpController::GetFrameParameters}\label{wxhelpcontrollergetframeparameters} + +\func{virtual wxFrame *}{GetFrameParameters}{\param{const wxSize * }{size = NULL}, \param{const wxPoint * }{pos = NULL}, + \param{bool *}{newFrameEachTime = NULL}} + +This reads the current settings for the help frame in the case of the +wxHelpControllerHtml, setting the frame size, position and +the newFrameEachTime parameters to the last values used. It also +returns the pointer to the last opened help frame. This can be used +for example, to automatically close the help frame on program +shutdown. + +wxHtmlHelpController returns the frame, +size and position. + +For all other help controllers, this function does nothing +and just returns NULL. + +\wxheading{Parameters} + +\docparam{viewer}{This defaults to "netscape" for wxExtHelpController.} + +\docparam{flags}{This defaults to wxHELP\_NETSCAPE for wxExtHelpController, indicating +that the viewer is a variant of Netscape Navigator.} + \membersection{wxHelpController::KeywordSearch}\label{wxhelpcontrollerkeywordsearch} \func{virtual bool}{KeywordSearch}{\param{const wxString\& }{keyWord}} @@ -131,71 +159,66 @@ If the help viewer is not running, runs it and displays the given section. If the help viewer is not running, runs it, and searches for sections matching the given keyword. If one match is found, the file is displayed at this section. -{\it wxHelp:} If more than one -match is found, the Search dialog is displayed with the matches. - {\it WinHelp:} If more than one match is found, the first topic is displayed. {\it External HTML help:} If more than one match is found, a choice of topics is displayed. +{\it wxHtmlHelpController:} see \helpref{wxHtmlHelpController::KeywordSearch}{wxhtmlhelpcontrollerkeywordsearch}. + \membersection{wxHelpController::LoadFile}\label{wxhelpcontrollerloadfile} \func{virtual bool}{LoadFile}{\param{const wxString\& }{file = ""}} If the help viewer is not running, runs it and loads the given file. If the filename is not supplied or is -NULL, the file specified in {\bf Initialize} is used. If the viewer is +empty, the file specified in {\bf Initialize} is used. If the viewer is already displaying the specified file, it will not be reloaded. This member function may be used before each display call in case the user has opened another file. -\membersection{wxHelpController::SetViewer}\label{wxhelpcontrollersetviewer} +wxHtmlHelpController ignores this call. -\func{virtual void}{SetViewer}{\param{const wxString\& }{viewer}, \param{long}{ flags}} +\membersection{wxHelpController::OnQuit}\label{wxhelpcontrolleronquit} -Sets detailed viewer information. So far this is only relevant to wxExtHelpController. +\func{virtual bool}{OnQuit}{\void} + +Overridable member called when this application's viewer is quit by the user. + +This does not work for all help controllers. \membersection{wxHelpController::SetFrameParameters}\label{wxhelpcontrollersetframeparameters} -\func{virtual void}{SetFrameParameters} -{\param{const wxString \& }{title}, + +\func{virtual void}{SetFrameParameters}{\param{const wxString \& }{title}, \param{const wxSize \& }{size}, \param{const wxPoint \& }{pos = wxDefaultPosition}, \param{bool }{newFrameEachTime = FALSE}} -For the wxHelpControllerHtml, this allows the application to set the +For wxHelpControllerHtml, this allows the application to set the default frame title, size and position for the frame. If the title contains \%s, this will be replaced with the page title. If the -parammeter newFrameEachTime is set, the controller will open a new -help frame each time it is called. For all other help controllers this -function has no effect. +parameter newFrameEachTime is set, the controller will open a new +help frame each time it is called. -\membersection{wxHelpController::GetFrameParameters}\label{wxhelpcontrollergetframeparameters} -\func{virtual wxFrame *}{GetFrameParameters} -{\param{const wxSize * }{size = NULL}, \param{const wxPoint * }{pos = NULL}, - \param{bool *}{newFrameEachTime = NULL}} -This reads the current settings for the help frame in the case of the -wxHelpControllerHtml, setting the frame size, position and -the newFrameEachTime parameters to the last values used. It also -returns the pointer to the last opened help frame. This can be used -for example, to automatically close the help frame on program -shutdown. For all other help controllers, this function does nothing -and just returns NULL. +For wxHtmlHelpController, the title is set (again with \%s indicating the +page title) and also the size and position of the frame if the frame is already +open. {\it newFrameEachTime} is ignored. -\wxheading{Parameters} - -\docparam{viewer}{This defaults to "netscape" for wxExtHelpController.} +For all other help controllers this function has no effect. -\docparam{flags}{This defaults to wxHELP\_NETSCAPE for wxExtHelpController, indicating -that the viewer is a variant of Netscape Navigator.} +\membersection{wxHelpController::SetViewer}\label{wxhelpcontrollersetviewer} -\membersection{wxHelpController::OnQuit}\label{wxhelpcontrolleronquit} +\func{virtual void}{SetViewer}{\param{const wxString\& }{viewer}, \param{long}{ flags}} -\func{virtual bool}{OnQuit}{\void} +Sets detailed viewer information. So far this is only relevant to wxExtHelpController. -Overridable member called when this application's viewer is quit by the user. +Some examples of usage: -This does not work for all help controllers. +\begin{verbatim} + m_help.SetViewer("kdehelp"); + m_help.SetViewer("gnome-help-browser"); + m_help.SetViewer("netscape", wxHELP_NETSCAPE); +\end{verbatim} \membersection{wxHelpController::Quit}\label{wxhelpcontrollerquit} diff --git a/docs/latex/wx/hthelpct.tex b/docs/latex/wx/hthelpct.tex index be95b150ac..996abf852a 100644 --- a/docs/latex/wx/hthelpct.tex +++ b/docs/latex/wx/hthelpct.tex @@ -9,7 +9,7 @@ wxHelpController!} This help controller provides an easy way of displaying HTML help in your -application (see {\it test} sample). The help system is based on {\bf books} +application (see {\it test} sample). The help system is based on {\bf books} (see \helpref{AddBook}{wxhtmlhelpcontrolleraddbook}). A book is a logical section of documentation (for example "User's Guide" or "Programmer's Guide" or "C++ Reference" or "wxWindows Reference"). The help controller can handle as @@ -33,9 +33,9 @@ have the following line in your .rc file: It is strongly recommended to use preprocessed {\bf .hhp.cached} version of projects. It can be either created on-the-fly (see -\helpref{SetTempDir}{wxhtmlhelpcontrollersettempdir}) or you can use +\helpref{SetTempDir}{wxhtmlhelpcontrollersettempdir}) or you can use {\bf hhp2cached} utility from {\it utils/hhp2cached} to create it and -distribute the cached version together with helpfiles. See {\it samples/html/help} +distribute the cached version together with helpfiles. See {\it samples/html/help} sample for demonstration of its use. \wxheading{Derived from} @@ -46,7 +46,6 @@ sample for demonstration of its use. - \latexignore{\rtfignore{\wxheading{Members}}} \membersection{wxHtmlHelpController::wxHtmlHelpController}\label{wxhtmlhelpcontrollerwxhtmlhelpcontroller} @@ -59,7 +58,7 @@ Constructor. {\it style} is combination of these flags: -\begin{twocollist} +\begin{twocollist}\itemsep=0pt \twocolitem{\windowstyle{wxHF\_TOOLBAR}}{Help frame has toolbar.} \twocolitem{\windowstyle{wxHF\_CONTENTS}}{Help frame has contents panel.} \twocolitem{\windowstyle{wxHF\_INDEX}}{Help frame has index panel.} @@ -85,6 +84,13 @@ recommended way. If {\it show\_wait\_msg} is TRUE then a decorationless window with progress message is displayed. +\membersection{wxHtmlHelpController::CreateHelpFrame}\label{wxhtmlhelpcontrollercreatehelpframe} + +\func{virtual wxHtmlHelpFrame*}{CreateHelpFrame}{\param{wxHtmlHelpData * }{data}} + +This protected virtual method may be overriden so that the controller +uses slightly different frame. See {\it samples/html/helpview} sample for +an example. \membersection{wxHtmlHelpController::Display}\label{wxhtmlhelpcontrollerdisplay} \func{void}{Display}{\param{const wxString\& }{x}} @@ -152,7 +158,7 @@ Reads the controller's setting (position of window, etc.) Sets the path for storing temporary files - cached binary versions of index and contents files. These binary forms are much faster to read. Default value is empty string (empty string means -that no cached data are stored). Note that these files are {\it not} +that no cached data are stored). Note that these files are {\it not} deleted when program exits. Once created these cached files will be used in all subsequent executions @@ -188,12 +194,4 @@ default wxConfig object if available (for details see Stores controllers setting (position of window etc.) -\membersection{wxHtmlHelpController::CreateHelpFrame}\label{wxhtmlhelpcontrollercreatehelpframe} - -\func{virtual wxHtmlHelpFrame*}{CreateHelpFrame}{\param{wxHtmlHelpData * }{data}} - -This protected virtual method may be overriden so that the controller -uses slightly different frame. See {\it samples/html/helpview} sample for -an example. - diff --git a/docs/latex/wx/hthlpdat.tex b/docs/latex/wx/hthlpdat.tex index 4a5d7cc432..c920f9fb07 100644 --- a/docs/latex/wx/hthlpdat.tex +++ b/docs/latex/wx/hthlpdat.tex @@ -5,12 +5,11 @@ \section{\class{wxHtmlHelpData}}\label{wxhtmlhelpdata} -This class is used by \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller} +This class is used by \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller} and \helpref{wxHtmlHelpFrame}{wxhtmlhelpframe} to access HTML help items. It is internal class and should not be used directly - except for the case you're writing your own HTML help controller. - \wxheading{Derived from} \helpref{wxObject}{wxobject} @@ -21,14 +20,12 @@ you're writing your own HTML help controller. \latexignore{\rtfignore{\wxheading{Members}}} - \membersection{wxHtmlHelpData::wxHtmlHelpData}\label{wxhtmlhelpdatawxhtmlhelpdata} \func{}{wxHtmlHelpData}{\void} Constructor. - \membersection{wxHtmlHelpData::AddBook}\label{wxhtmlhelpdataaddbook} \func{bool}{AddBook}{\param{const wxString\& }{book}} @@ -38,21 +35,18 @@ that contains arbitrary number of .hhp projects (this zip file can have either .zip or .htb extension, htb stands for "html book"). Returns success. - \membersection{wxHtmlHelpData::FindPageById}\label{wxhtmlhelpdatafindpagebyid} \func{wxString}{FindPageById}{\param{int }{id}} Returns page's URL based on integer ID stored in project. - \membersection{wxHtmlHelpData::FindPageByName}\label{wxhtmlhelpdatafindpagebyname} \func{wxString}{FindPageByName}{\param{const wxString\& }{page}} Returns page's URL based on its (file)name. - \membersection{wxHtmlHelpData::GetBookRecArray}\label{wxhtmlhelpdatagetbookrecarray} \func{const wxHtmlBookRecArray\&}{GetBookRecArray}{\void} diff --git a/docs/latex/wx/hthlpfrm.tex b/docs/latex/wx/hthlpfrm.tex index 413f6fae97..d255a73df8 100644 --- a/docs/latex/wx/hthlpfrm.tex +++ b/docs/latex/wx/hthlpfrm.tex @@ -5,7 +5,7 @@ \section{\class{wxHtmlHelpFrame}}\label{wxhtmlhelpframe} -This class is used by \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller} +This class is used by \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller} to display help. It is an internal class and should not be used directly - except for the case when you're writing your own HTML help controller. @@ -18,7 +18,6 @@ when you're writing your own HTML help controller. - \latexignore{\rtfignore{\wxheading{Members}}} \membersection{wxHtmlHelpFrame::wxHtmlHelpFrame}\label{wxhtmlhelpframewxhtmlhelpframe} @@ -131,14 +130,14 @@ Reads user's settings for this frame (see \helpref{wxHtmlHelpController::ReadCus \func{void}{RefreshLists}{\param{bool }{show\_progress = FALSE}} -Refresh all panels. This is necessary if new book was added. +Refresh all panels. This is necessary if a new book was added. \membersection{wxHtmlHelpFrame::SetTitleFormat}\label{wxhtmlhelpframesettitleformat} \func{void}{SetTitleFormat}{\param{const wxString\& }{format}} -Sets frame's title format. {\it format} must contain exactly one "\%s" -(it will be replaced by page's title). +Sets the frame's title format. {\it format} must contain exactly one "\%s" +(it will be replaced by the page title). \membersection{wxHtmlHelpFrame::UseConfig}\label{wxhtmlhelpframeuseconfig} diff --git a/include/wx/defs.h b/include/wx/defs.h index 6eba129446..0e5280b83f 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -1169,6 +1169,8 @@ enum wxStretch #define wxPD_ELAPSED_TIME 0x0008 #define wxPD_ESTIMATED_TIME 0x0010 // wxGA_SMOOTH = 0x0020 may also be used with wxProgressDialog +// NO!!! This is wxDIALOG_MODAL and will cause the progress dialog to +// be modal. No progress will then be made at all. #define wxPD_REMAINING_TIME 0x0040 /* diff --git a/samples/help/demo.cpp b/samples/help/demo.cpp index 35778a4694..1e071f880c 100644 --- a/samples/help/demo.cpp +++ b/samples/help/demo.cpp @@ -45,7 +45,12 @@ #endif #if USE_HTML_HELP -# include "wx/generic/helpwxht.h" + +#include +#include + +#include "wx/generic/helpwxht.h" +#include "wx/html/helpctrl.h" #endif // ---------------------------------------------------------------------------- @@ -84,18 +89,21 @@ public: #if USE_HTML_HELP wxHelpControllerHtml& GetHtmlHelpController() { return m_htmlHelp; } + wxHtmlHelpController& GetAdvancedHtmlHelpController() { return m_advancedHtmlHelp; } #endif // event handlers (these functions should _not_ be virtual) void OnQuit(wxCommandEvent& event); void OnHelp(wxCommandEvent& event); void OnHtmlHelp(wxCommandEvent& event); + void OnAdvancedHtmlHelp(wxCommandEvent& event); private: wxHelpController m_help; #if USE_HTML_HELP wxHelpControllerHtml m_htmlHelp; + wxHtmlHelpController m_advancedHtmlHelp; #endif // any class wishing to process wxWindows events must use this macro @@ -123,11 +131,17 @@ enum HelpDemo_Html_Help_Help, HelpDemo_Html_Help_Search, + HelpDemo_Advanced_Html_Help_Index, + HelpDemo_Advanced_Html_Help_Classes, + HelpDemo_Advanced_Html_Help_Functions, + HelpDemo_Advanced_Html_Help_Help, + HelpDemo_Advanced_Html_Help_Search, + HelpDemo_Help_KDE, HelpDemo_Help_GNOME, HelpDemo_Help_Netscape, // controls start here (the numbers are, of course, arbitrary) - HelpDemo_Text = 1000 + HelpDemo_Text = 1000, }; // ---------------------------------------------------------------------------- @@ -151,6 +165,12 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(HelpDemo_Html_Help_Help, MyFrame::OnHtmlHelp) EVT_MENU(HelpDemo_Html_Help_Search, MyFrame::OnHtmlHelp) + EVT_MENU(HelpDemo_Advanced_Html_Help_Index, MyFrame::OnAdvancedHtmlHelp) + EVT_MENU(HelpDemo_Advanced_Html_Help_Classes, MyFrame::OnAdvancedHtmlHelp) + EVT_MENU(HelpDemo_Advanced_Html_Help_Functions, MyFrame::OnAdvancedHtmlHelp) + EVT_MENU(HelpDemo_Advanced_Html_Help_Help, MyFrame::OnAdvancedHtmlHelp) + EVT_MENU(HelpDemo_Advanced_Html_Help_Search, MyFrame::OnAdvancedHtmlHelp) + EVT_MENU(HelpDemo_Help_KDE, MyFrame::OnHelp) EVT_MENU(HelpDemo_Help_GNOME, MyFrame::OnHelp) EVT_MENU(HelpDemo_Help_Netscape, MyFrame::OnHelp) @@ -178,6 +198,12 @@ bool MyApp::OnInit() #if wxUSE_GIF // Required for images in the online documentation wxImage::AddHandler(new wxGIFHandler); + + // Required for advanced HTML help +#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB + wxFileSystem::AddHandler(new wxZipFSHandler); +#endif + #endif #endif @@ -199,7 +225,7 @@ bool MyApp::OnInit() } #if USE_HTML_HELP - // initialise the help system: this means that the HTML docs are in the + // initialise the standard HTML help system: this means that the HTML docs are in the // subdirectory doc for platforms using HTML help if ( !frame->GetHtmlHelpController().Initialize("doc") ) { @@ -207,6 +233,15 @@ bool MyApp::OnInit() return FALSE; } + + // initialise the advanced HTML help system: this means that the HTML docs are in .htb + // (zipped) form + if ( !frame->GetAdvancedHtmlHelpController().Initialize("doc") ) + { + wxLogError("Cannot initialize the advanced HTML help system, aborting."); + + return FALSE; + } #endif return TRUE; @@ -230,7 +265,6 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) menuFile->Append(HelpDemo_Help_Classes, "&Help on Classes..."); menuFile->Append(HelpDemo_Help_Functions, "&Help on Functions..."); menuFile->Append(HelpDemo_Help_Help, "&About Help Demo..."); - menuFile->AppendSeparator(); menuFile->Append(HelpDemo_Help_Search, "&Search help..."); #if USE_HTML_HELP menuFile->AppendSeparator(); @@ -238,8 +272,13 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) menuFile->Append(HelpDemo_Html_Help_Classes, "HTML &Help on Classes..."); menuFile->Append(HelpDemo_Html_Help_Functions, "HTML &Help on Functions..."); menuFile->Append(HelpDemo_Html_Help_Help, "HTML &About Help Demo..."); - menuFile->AppendSeparator(); menuFile->Append(HelpDemo_Html_Help_Search, "HTML &Search help..."); + menuFile->AppendSeparator(); + menuFile->Append(HelpDemo_Advanced_Html_Help_Index, "Advanced HTML &Help Index..."); + menuFile->Append(HelpDemo_Advanced_Html_Help_Classes, "Advanced HTML &Help on Classes..."); + menuFile->Append(HelpDemo_Advanced_Html_Help_Functions, "Advanced HTML &Help on Functions..."); + menuFile->Append(HelpDemo_Advanced_Html_Help_Help, "Advanced HTML &About Help Demo..."); + menuFile->Append(HelpDemo_Advanced_Html_Help_Search, "Advanced HTML &Search help..."); #endif #ifndef __WXMSW__ @@ -365,3 +404,40 @@ void MyFrame::OnHtmlHelp(wxCommandEvent& event) #endif } +void MyFrame::OnAdvancedHtmlHelp(wxCommandEvent& event) +{ +#if USE_HTML_HELP + switch(event.GetId()) + { + + case HelpDemo_Advanced_Html_Help_Classes: + m_advancedHtmlHelp.DisplaySection(2); +// m_advancedHtmlHelp.Display("Classes"); // An alternative form + break; + case HelpDemo_Advanced_Html_Help_Functions: + m_advancedHtmlHelp.DisplaySection(1); +// m_advancedHtmlHelp.Display("Functions"); // An alternative form + break; + case HelpDemo_Advanced_Html_Help_Help: + m_advancedHtmlHelp.DisplaySection(3); +// m_advancedHtmlHelp.Display("About"); // An alternative form + break; + + case HelpDemo_Advanced_Html_Help_Search: + { + wxString key = wxGetTextFromUser("Search for?", + "Search help for keyword", + "", + this); + if(! key.IsEmpty()) + m_advancedHtmlHelp.KeywordSearch(key); + } + break; + case HelpDemo_Advanced_Html_Help_Index: + default: + m_advancedHtmlHelp.DisplayContents(); + break; + } +#endif +} + diff --git a/samples/help/demo.rc b/samples/help/demo.rc index 3bf71d6da0..507248e4ac 100644 --- a/samples/help/demo.rc +++ b/samples/help/demo.rc @@ -1,6 +1,3 @@ mondrian ICON "mondrian.ico" #include "wx/msw/wx.rc" - -#define MINIMAL_QUIT 1 -#define MINIMAL_ABOUT 102 - +#include "wx/html/msw/wxhtml.rc" diff --git a/samples/help/tex2rtf.ini b/samples/help/tex2rtf.ini index fe33da72c2..414eed45fa 100644 --- a/samples/help/tex2rtf.ini +++ b/samples/help/tex2rtf.ini @@ -19,3 +19,4 @@ truncateFilenames = yes combineSubSections = yes htmlIndex = yes htmlFrameContents = no +htmlWorkshopFiles = yes diff --git a/src/generic/helpwxht.cpp b/src/generic/helpwxht.cpp index f4ca7a115e..955dcd87e8 100644 --- a/src/generic/helpwxht.cpp +++ b/src/generic/helpwxht.cpp @@ -212,6 +212,13 @@ wxHelpFrame::wxHelpFrame(wxWindow *parent, int id, m_htmlwin->SetRelatedStatusBar(0); m_htmlwin->AddFilter(m_filter); +#ifdef __WXMOTIF__ + // Motif needs a nudge to get it to resize properly + // when shown + wxSizeEvent event(size, GetId()); + GetEventHandler()->ProcessEvent(event); +#endif + Show(TRUE); } diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index dd0765d2ed..b8a6a17e00 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -129,7 +129,11 @@ wxProgressDialog::wxProgressDialog(wxString const &title, { m_gauge = new wxGauge(this, -1, maximum, wxDefaultPosition, wxDefaultSize, - wxGA_HORIZONTAL | wxRAISED_BORDER | (style & wxGA_SMOOTH)); + wxGA_HORIZONTAL | wxRAISED_BORDER); +// Sorry, but wxGA_SMOOTH happens to also mean wxDIALOG_MODAL and will +// cause the dialog to be modal. Have an extra style argument to wxProgressDialog, +// perhaps. +// wxGA_HORIZONTAL | wxRAISED_BORDER | (style & wxGA_SMOOTH)); c = new wxLayoutConstraints; c->left.SameAs(this, wxLeft, 2*LAYOUT_X_MARGIN); c->top.Below(m_msg, 2*LAYOUT_Y_MARGIN); diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp index 5652912227..fec5196fb1 100644 --- a/src/motif/toolbar.cpp +++ b/src/motif/toolbar.cpp @@ -172,6 +172,12 @@ void wxToolBar::Init() m_maxHeight = -1; m_defaultWidth = 24; m_defaultHeight = 22; + m_toolPacking = 2; + m_toolSeparation = 8; + m_xMargin = 2; + m_yMargin = 2; + m_maxRows = 100; + m_maxCols = 100; } bool wxToolBar::Create(wxWindow *parent, diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 4ec50c7839..2a8e53ebab 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -441,6 +441,9 @@ wxWindow::~wxWindow() m_borderWidget = (WXWidget) 0; } } + else // Why wasn't this here before? JACS 8/3/2000 + DestroyChildren(); + // Destroy the window if (GetMainWidget()) -- 2.45.2