Doc updates, wxsizer et al
wxFileDialog displays current dir now, wxTipProvider uses statictext for headline messagebox (and other) dialogs now always display an OK buttons, unless wxYES_NO is given Appending a menu to a menu bar after having called wxFrame::SetMenuBar() should now work Added test to configure so that it correctly sets compiler flags etc if GCC is used on Solaris and IRIX instead of CC, also changed default shared library create to GCC from G++ on some platforms (as previously already Linux) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
03443829ac
commit
9c8849722a
@ -54,12 +54,6 @@ won't ever work, but there is now a new makefile system
|
||||
that works without libtool and automake, using only
|
||||
configure to create what is needed.
|
||||
|
||||
In order to create configure, you need to have the
|
||||
GNU autoconf package (version 2.13 or 2.14) installed
|
||||
on your system and type run "autoconf" in the base
|
||||
directory (or run the autogen.sh script in the same
|
||||
directory, which just calls autoconf).
|
||||
|
||||
Set WXWIN environment variable to the base directory such
|
||||
as ~/wxWindows (this is actually not really needed).
|
||||
|
||||
|
24
configure.in
24
configure.in
@ -1592,24 +1592,34 @@ case "${host}" in
|
||||
WX_CREATE_LINKS="CREATE_LINKS"
|
||||
;;
|
||||
*-*-irix5* | *-*-irix6* )
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
if test "$GCC" = yes ; then
|
||||
SHARED_LD="${CC} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
else
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
fi
|
||||
WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS"
|
||||
WX_CREATE_LINKS="CREATE_LINKS"
|
||||
;;
|
||||
*-*-solaris2* )
|
||||
SHARED_LD="${CXX} -G -o"
|
||||
PIC_FLAG="PIC"
|
||||
if test "$GCC" = yes ; then
|
||||
SHARED_LD="${CC} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
else
|
||||
SHARED_LD="${CXX} -G -o"
|
||||
PIC_FLAG="PIC"
|
||||
fi
|
||||
WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS"
|
||||
WX_CREATE_LINKS="CREATE_LINKS"
|
||||
;;
|
||||
*-*-sunos4* )
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
SHARED_LD="${CC} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS"
|
||||
WX_CREATE_LINKS="CREATE_LINKS"
|
||||
;;
|
||||
*-*-freebsd* | *-*-netbsd*)
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
SHARED_LD="${CC} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS"
|
||||
WX_CREATE_LINKS="CREATE_LINKS"
|
||||
@ -1627,7 +1637,7 @@ case "${host}" in
|
||||
WX_CREATE_LINKS="CREATE_LINKS"
|
||||
;;
|
||||
*-*-sysv5* )
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
SHARED_LD="${CC} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS"
|
||||
WX_CREATE_LINKS="CREATE_LINKS"
|
||||
@ -1997,6 +2007,8 @@ if test "$GCC" = yes ; then
|
||||
if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then
|
||||
WXDEBUG_DEFINE="$WXDEBUG_DEFINE -fno-exceptions"
|
||||
fi
|
||||
dnl CFLAGS="${CFLAGS} -fpermissive"
|
||||
dnl CXXFLAGS="${CXXFLAGS} -fpermissive"
|
||||
fi
|
||||
|
||||
|
||||
|
@ -100,13 +100,22 @@ or wxHORIZONTAL for creating either a column sizer or a row sizer.
|
||||
|
||||
\func{void}{RecalcSizes}{\void}
|
||||
|
||||
Implements the calculation of a box sizer's dimensions and then sets
|
||||
the size of its its children (calling \helpref{wxWindow::SetSize}{wxwindowsetsize}
|
||||
if the child is a window). It is used internally only and must not be called
|
||||
by the users. Documented for information.
|
||||
|
||||
\membersection{wxBoxSizer::CalcMin}\label{wxboxsizercalcmin}
|
||||
|
||||
\func{wxSize}{CalcMin}{\void}
|
||||
|
||||
Implements the calculation of a box sizer's minimal. It is used internally
|
||||
only and must not be called by the users. Documented for information.
|
||||
|
||||
\membersection{wxBoxSizer::GetOrientation}\label{wxboxsizergetorientation}
|
||||
|
||||
\func{int}{GetOrientation}{\void}
|
||||
|
||||
Returns the orientation of the boxsizer, either of wxVERTICAL
|
||||
or wxHORIZONTAL.
|
||||
|
||||
|
@ -236,6 +236,7 @@ These are the data structure classes supported by wxWindows.
|
||||
\twocolitem{\helpref{wxRegion}{wxregion}}{A class representing a region}
|
||||
\twocolitem{\helpref{wxString}{wxstring}}{A string class}
|
||||
\twocolitem{\helpref{wxStringList}{wxstringlist}}{A class representing a list of strings}
|
||||
\twocolitem{\helpref{wxStringTokenizer}{wxstringtokenizer}}{A class for interpreting a string as a list of tokens or words}
|
||||
\twocolitem{\helpref{wxRealPoint}{wxrealpoint}}{Representation of a point using floating point numbers}
|
||||
\twocolitem{\helpref{wxSize}{wxsize}}{Representation of a size}
|
||||
\twocolitem{\helpref{wxTime}{wxtime}}{A class for time manipulation}
|
||||
|
@ -90,10 +90,17 @@ Destructor, destroying the choice item.
|
||||
|
||||
Adds the item to the end of the choice control.
|
||||
|
||||
\func{void}{Append}{\param{const wxString\& }{ item}, \param{void* }{clientData}}
|
||||
|
||||
Adds the item to the end of the combobox, associating the given data
|
||||
with the item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{item}{String to add.}
|
||||
|
||||
\docparam{clientData}{Client data to associate with the item.}
|
||||
|
||||
\membersection{wxChoice::Clear}\label{wxchoiceclear}
|
||||
|
||||
\func{void}{Clear}{\void}
|
||||
@ -133,6 +140,20 @@ Gets the number of columns in this choice item.
|
||||
|
||||
This is implemented for Motif only.
|
||||
|
||||
\membersection{wxChoice::GetClientData}\label{wxchoicegetclientdata}
|
||||
|
||||
\constfunc{void*}{GetClientData}{\param{int}{ n}}
|
||||
|
||||
Returns a pointer to the client data associated with the given item (if any).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{An item, starting from zero.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
A pointer to the client data, or NULL if the item was not found.
|
||||
|
||||
\membersection{wxChoice::GetSelection}\label{wxchoicegetselection}
|
||||
|
||||
\constfunc{int}{GetSelection}{\void}
|
||||
@ -165,6 +186,18 @@ Gets the selected string, or the empty string if no string is selected.
|
||||
|
||||
Returns the number of strings in the choice control.
|
||||
|
||||
\membersection{wxChoice::SetClientData}\label{wxchoicesetclientdata}
|
||||
|
||||
\func{void}{SetClientData}{\param{int}{ n}, \param{void* }{data}}
|
||||
|
||||
Associates the given client data pointer with the given item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based item.}
|
||||
|
||||
\docparam{data}{The client data.}
|
||||
|
||||
\membersection{wxChoice::SetColumns}\label{wxchoicesetcolumns}
|
||||
|
||||
\func{void}{SetColumns}{\param{int}{ n = 1}}
|
||||
|
@ -80,10 +80,10 @@ which is generated by a control.}
|
||||
|
||||
\membersection{wxCommandEvent::m\_clientData}
|
||||
|
||||
\member{char*}{m\_clientData}
|
||||
\member{void*}{m\_clientData}
|
||||
|
||||
Contains a pointer to client data for listboxes and choices, if the event
|
||||
was a selection.
|
||||
was a selection. Beware, this is not implemented anyway...
|
||||
|
||||
\membersection{wxCommandEvent::m\_commandInt}
|
||||
|
||||
@ -123,10 +123,10 @@ Returns TRUE or FALSE for a checkbox selection event.
|
||||
|
||||
\membersection{wxCommandEvent::GetClientData}
|
||||
|
||||
\func{char*}{GetClientData}{\void}
|
||||
\func{void*}{GetClientData}{\void}
|
||||
|
||||
Returns client data pointer for a listbox or choice selection event
|
||||
(not valid for a deselection).
|
||||
(not valid for a deselection). Beware, this is not implmented anywhere...
|
||||
|
||||
\membersection{wxCommandEvent::GetExtraLong}
|
||||
|
||||
@ -163,7 +163,7 @@ is a deselection.
|
||||
|
||||
\membersection{wxCommandEvent::SetClientData}
|
||||
|
||||
\func{void}{SetClientData}{\param{char*}{ clientData}}
|
||||
\func{void}{SetClientData}{\param{void*}{ clientData}}
|
||||
|
||||
Sets the client data for this event.
|
||||
|
||||
|
@ -21,7 +21,7 @@ A combobox permits a single selection only. Combobox items are numbered from zer
|
||||
\wxheading{Window styles}
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxCB\_SIMPLE}}{Creates a combobox with a permanently displayed list.}
|
||||
\twocolitem{\windowstyle{wxCB\_SIMPLE}}{Creates a combobox with a permanently displayed list. Windows only. }
|
||||
\twocolitem{\windowstyle{wxCB\_DROPDOWN}}{Creates a combobox with a drop-down list.}
|
||||
\twocolitem{\windowstyle{wxCB\_READONLY}}{Creates a combo box consisting of a drop-down list and static text item
|
||||
displaying the current selection.}
|
||||
@ -102,7 +102,7 @@ Destructor, destroying the combobox.
|
||||
|
||||
Adds the item to the end of the combobox.
|
||||
|
||||
\func{void}{Append}{\param{const wxString\& }{ item}, \param{char* }{clientData}}
|
||||
\func{void}{Append}{\param{const wxString\& }{ item}, \param{void* }{clientData}}
|
||||
|
||||
Adds the item to the end of the combobox, associating the given data
|
||||
with the item.
|
||||
@ -168,7 +168,7 @@ The position if found, or -1 if not found.
|
||||
|
||||
\membersection{wxComboBox::GetClientData}\label{wxcomboboxgetclientdata}
|
||||
|
||||
\constfunc{char*}{GetClientData}{\param{int}{ n}}
|
||||
\constfunc{void*}{GetClientData}{\param{int}{ n}}
|
||||
|
||||
Returns a pointer to the client data associated with the given item (if any).
|
||||
|
||||
@ -265,7 +265,7 @@ Removes the text between the two positions in the combobox text field.
|
||||
|
||||
\membersection{wxComboBox::SetClientData}\label{wxcomboboxsetclientdata}
|
||||
|
||||
\func{void}{SetClientData}{\param{int}{ n}, \param{char* }{data}}
|
||||
\func{void}{SetClientData}{\param{int}{ n}, \param{void* }{data}}
|
||||
|
||||
Associates the given client data pointer with the given item.
|
||||
|
||||
|
@ -48,11 +48,12 @@ temporary storage that should not be deallocated.
|
||||
|
||||
This function does directory searching; returns the first file
|
||||
that matches the path {\it spec}, or the empty string. Use \helpref{wxFindNextFile}{wxfindnextfile} to
|
||||
get the next matching file.
|
||||
get the next matching file. Neither will report the current directory "." or the
|
||||
parent directory "..".
|
||||
|
||||
{\it spec} may contain wildcards.
|
||||
|
||||
{\it flags} is reserved for future use.
|
||||
{\it flags} may be wxDIR for restricting the query to directories, wxFILE for files or zero for either.
|
||||
|
||||
For example:
|
||||
|
||||
|
@ -437,8 +437,8 @@ mimetype to the named file}
|
||||
|
||||
\func{wxImage}{Rescale}{\param{int}{ width}, \param{int}{ height}}
|
||||
|
||||
Changes the size of the image in-place: after a call to this function, thei
|
||||
mage will have the given width and height.
|
||||
Changes the size of the image in-place: after a call to this function, the
|
||||
image will have the given width and height.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
|
@ -35,7 +35,7 @@ select multiple items using the SHIFT key and the mouse or special key combinati
|
||||
\twocolitem{\windowstyle{wxLB\_HSCROLL}}{Create horizontal scrollbar if contents are too wide (Windows only).}
|
||||
\twocolitem{\windowstyle{wxLB\_ALWAYS\_SB}}{Always show a vertical scrollbar.}
|
||||
\twocolitem{\windowstyle{wxLB\_NEEDED\_SB}}{Only create a vertical scrollbar if needed.}
|
||||
\twocolitem{\windowstyle{wxLB\_SORT}}{The listbox contents are sorted in alphabetical order.}
|
||||
\twocolitem{\windowstyle{wxLB\_SORT}}{The listbox contents are sorted in alphabetical order. No effect for GTK.}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
@ -113,7 +113,7 @@ Destructor, destroying the list box.
|
||||
|
||||
Adds the item to the end of the list box.
|
||||
|
||||
\func{void}{Append}{\param{const wxString\& }{ item}, \param{char* }{clientData}}
|
||||
\func{void}{Append}{\param{const wxString\& }{ item}, \param{void* }{clientData}}
|
||||
|
||||
Adds the item to the end of the list box, associating the given data
|
||||
with the item.
|
||||
@ -180,7 +180,7 @@ The zero-based position of the item, or -1 if the string was not found.
|
||||
|
||||
\membersection{wxListBox::GetClientData}\label{wxlistboxgetclientdata}
|
||||
|
||||
\constfunc{char*}{GetClientData}{\param{int}{ n}}
|
||||
\constfunc{void*}{GetClientData}{\param{int}{ n}}
|
||||
|
||||
Returns a pointer to the client data associated with the given item (if any).
|
||||
|
||||
@ -214,7 +214,7 @@ Applicable to single selection list boxes only.
|
||||
|
||||
\membersection{wxListBox::GetSelections}\label{wxlistboxgetselections}
|
||||
|
||||
\constfunc{int}{GetSelections}{\param{wxArrayInt&}{selections}}
|
||||
\constfunc{int}{GetSelections}{\param{wxArrayInt& }{selections}}
|
||||
|
||||
Fill an array of ints with the positions of the currently selected items.
|
||||
|
||||
@ -306,7 +306,7 @@ TRUE if the given item is selected, FALSE otherwise.
|
||||
|
||||
\func{void}{Set}{\param{int}{ n}, \param{const wxString*}{ choices}}
|
||||
|
||||
Clears the list box and adds the given strings.
|
||||
Clears the list box and adds the given strings. Not implemented for GTK.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
@ -321,7 +321,7 @@ after this function has been called.
|
||||
|
||||
\membersection{wxListBox::SetClientData}\label{wxlistboxsetclientdata}
|
||||
|
||||
\func{void}{SetClientData}{\param{int}{ n}, \param{char* }{data}}
|
||||
\func{void}{SetClientData}{\param{int}{ n}, \param{void* }{data}}
|
||||
|
||||
Associates the given client data pointer with the given item.
|
||||
|
||||
|
@ -1,41 +1,28 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% include\wx\sizer.h at 13/Aug/99 22:27:59
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxStaticBoxSizer}}\label{wxstaticboxsizer}
|
||||
|
||||
wxStaticBoxSizer is a sizer derived from wxBoxSizer. It is useful for
|
||||
layouts which make use of static boxes in connection with sizers.
|
||||
|
||||
|
||||
wxStaticBoxSizer
|
||||
|
||||
See also \helpref{wxSizer}{wxsizer}, \helpref{wxStaticBox}{wxstaticbox} and
|
||||
\helpref{wxBoxSizer}{wxboxsizer}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxBoxSizer}{wxboxsizer}
|
||||
|
||||
\wxheading{Data structures}
|
||||
\helpref{wxBoxSizer}{wxboxsizer}\\
|
||||
\helpref{wxSizer}{wxsizer}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxStaticBoxSizer::wxStaticBoxSizer}\label{wxstaticboxsizerwxstaticboxsizer}
|
||||
|
||||
\func{}{wxStaticBoxSizer}{\param{wxStaticBox* }{box}, \param{int }{orient}}
|
||||
|
||||
|
||||
\membersection{wxStaticBoxSizer::RecalcSizes}\label{wxstaticboxsizerrecalcsizes}
|
||||
|
||||
\func{void}{RecalcSizes}{\void}
|
||||
|
||||
|
||||
\membersection{wxStaticBoxSizer::CalcMin}\label{wxstaticboxsizercalcmin}
|
||||
|
||||
\func{wxSize}{CalcMin}{\void}
|
||||
|
||||
Constructor. It takes an associated static box and the orientation {\it orient}
|
||||
as parameters - orient can be either of wxVERTICAL or wxHORIZONTAL.
|
||||
|
||||
\membersection{wxStaticBoxSizer::GetStaticBox}\label{wxstaticboxsizergetstaticbox}
|
||||
|
||||
\func{wxStaticBox*}{GetStaticBox}{\void}
|
||||
|
||||
Returns the static box associated with the sizer.
|
@ -32,72 +32,117 @@ on Windows, the intial dialog size will automatically be bigger on Motif than on
|
||||
|
||||
\func{}{wxSizer}{\void}
|
||||
|
||||
The constructor. Note that wxSizer is an abstract base class and may not
|
||||
be instantiated.
|
||||
|
||||
\membersection{wxSizer::\destruct{wxSizer}}\label{wxsizerdtor}
|
||||
|
||||
\func{}{\destruct{wxSizer}}{\void}
|
||||
|
||||
The destructor.
|
||||
|
||||
\membersection{wxSizer::Add}\label{wxsizeradd}
|
||||
|
||||
\func{void}{Add}{\param{wxWindow* }{window}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border = 0}}
|
||||
|
||||
|
||||
\membersection{wxSizer::Add}\label{wxsizeradd}
|
||||
|
||||
\func{void}{Add}{\param{wxSizer* }{sizer}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border = 0}}
|
||||
|
||||
|
||||
\membersection{wxSizer::Add}\label{wxsizeradd}
|
||||
|
||||
\func{void}{Add}{\param{int }{width}, \param{int }{height}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border = 0}}
|
||||
|
||||
Adds the {\it window} to the sizer. As wxSizer itself is an abstract class, the parameters
|
||||
have no meaning in the wxSizer class itself, but as there currently is only one class
|
||||
deriving directly from wxSizer and this class does not override these methods, the meaning
|
||||
of the paramters is described here:
|
||||
|
||||
\membersection{wxSizer::Prepend}\label{wxsizerprepend}
|
||||
|
||||
\func{void}{Prepend}{\param{wxWindow* }{window}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border = 0}}
|
||||
|
||||
\func{void}{Prepend}{\param{wxSizer* }{sizer}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border = 0}}
|
||||
|
||||
\func{void}{Prepend}{\param{int }{width}, \param{int }{height}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border = 0}}
|
||||
|
||||
Same as \helpref{wxSizer::Add}{wxsizeradd}, but prepends the items to the beginning of the
|
||||
list of items (windows, subsizers or spaces) own by this sizer.
|
||||
|
||||
\membersection{wxSizer::Remove}\label{wxsizerremove}
|
||||
|
||||
\func{bool}{Remove}{\param{wxWindow* }{window}}
|
||||
|
||||
\func{bool}{Remove}{\param{wxSizer* }{sizer}}
|
||||
|
||||
\func{bool}{Remove}{\param{int }{nth}}
|
||||
|
||||
Removes a child from the sizer. {\it window} is the window to be removed, {\it sizer} the
|
||||
equivalent sizer and {\it nth} is the position of the child in the sizer, typically 0 for
|
||||
the first item. This method does not cause any layouting or resizing to take place and does
|
||||
not delete the window itself. Call \helpref{wxSizer::Layout}{wxsizerlayout} for updating
|
||||
the layout "on screen" after removing a child fom the sizer.
|
||||
|
||||
Returns TRUE if the child item was found and removed, FALSE otherwise.
|
||||
|
||||
\membersection{wxSizer::SetDimension}\label{wxsizersetdimension}
|
||||
|
||||
\func{void}{SetDimension}{\param{int }{x}, \param{int }{y}, \param{int }{width}, \param{int }{height}}
|
||||
|
||||
Call this to force the sizer to take the given dimension and thus force the items owned
|
||||
by the sizer to resize themselves according to the rules defined by the paramater in the
|
||||
\helpref{wxSizer::Add}{wxsizeradd} and \helpref{wxSizer::Prepend}{wxsizerprepend} methods.
|
||||
|
||||
\membersection{wxSizer::GetSize}\label{wxsizergetsize}
|
||||
|
||||
\func{wxSize}{GetSize}{\void}
|
||||
|
||||
Returns the current size of the sizer.
|
||||
|
||||
\membersection{wxSizer::GetPosition}\label{wxsizergetposition}
|
||||
|
||||
\func{wxPoint}{GetPosition}{\void}
|
||||
|
||||
Returns the current position of the sizer.
|
||||
|
||||
\membersection{wxSizer::GetMinSize}\label{wxsizergetminsize}
|
||||
|
||||
\func{wxSize}{GetMinSize}{\void}
|
||||
|
||||
Returns the minimal size of the sizer.
|
||||
|
||||
\membersection{wxSizer::RecalcSizes}\label{wxsizerrecalcsizes}
|
||||
|
||||
\func{void}{RecalcSizes}{\void}
|
||||
|
||||
This method is abstract and has to be overwritten by any derived class.
|
||||
Here, the sizer will do the actual calculation of its children's positions
|
||||
and sizes.
|
||||
|
||||
\membersection{wxSizer::CalcMin}\label{wxsizercalcmin}
|
||||
|
||||
\func{wxSize}{CalcMin}{\void}
|
||||
|
||||
This method is abstract and has to be overwritten by any derived class.
|
||||
Here, the sizer will do the actual calculation of its children minimal sizes.
|
||||
|
||||
\membersection{wxSizer::Layout}\label{wxsizerlayout}
|
||||
|
||||
\func{void}{Layout}{\void}
|
||||
|
||||
Call this to force laying out the children anew, e.g. after having added a child
|
||||
to or removed a child (window, other sizer or space) from the sizer while keeping
|
||||
the current dimension.
|
||||
|
||||
\membersection{wxSizer::Fit}\label{wxsizerfit}
|
||||
|
||||
\func{void}{Fit}{\param{wxWindow* }{window}}
|
||||
|
||||
Tell the sizer to resize the {\it window} to match the sizer's minimal size. This
|
||||
is commonly done in the constructor of the window itself, see sample in the description
|
||||
of \helpref{wxBoxSizer}{wxboxsizer}.
|
||||
|
||||
\membersection{wxSizer::SetSizeHints}\label{wxsizersetsizehints}
|
||||
|
||||
\func{void}{SetSizeHints}{\param{wxWindow* }{window}}
|
||||
|
||||
|
||||
\membersection{wxSizer::GetMinWindowSize}\label{wxsizergetminwindowsize}
|
||||
|
||||
\func{wxSize}{GetMinWindowSize}{\param{wxWindow* }{window}
|
||||
Tell the sizer to set the minimal size of the {\it window} to match the sizer's minimal size.
|
||||
This is commonly done in the constructor of the window itself, see sample in the description
|
||||
of \helpref{wxBoxSizer}{wxboxsizer} if the window is resizable (as many dialogs under Unix and
|
||||
frames on probably all platforms).
|
||||
|
@ -1,100 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% include\wx\sizer.h at 13/Aug/99 22:27:59
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSizerItem}}\label{wxsizeritem}
|
||||
|
||||
|
||||
|
||||
classes
|
||||
|
||||
|
||||
wxSizerItem
|
||||
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSizerItem::wxSizerItem}\label{wxsizeritemwxsizeritem}
|
||||
|
||||
\func{}{wxSizerItem}{\param{int }{width}, \param{int }{height}, \param{int }{option}, \param{int }{flag}, \param{int }{border}}
|
||||
|
||||
spacer
|
||||
|
||||
|
||||
\membersection{wxSizerItem::wxSizerItem}\label{wxsizeritemwxsizeritem}
|
||||
|
||||
\func{}{wxSizerItem}{\param{wxWindow* }{window}, \param{int }{option}, \param{int }{flag}, \param{int }{border}}
|
||||
|
||||
window
|
||||
|
||||
|
||||
\membersection{wxSizerItem::wxSizerItem}\label{wxsizeritemwxsizeritem}
|
||||
|
||||
\func{}{wxSizerItem}{\param{wxSizer* }{sizer}, \param{int }{option}, \param{int }{flag}, \param{int }{border}}
|
||||
|
||||
subsizer
|
||||
|
||||
|
||||
\membersection{wxSizerItem::GetSize}\label{wxsizeritemgetsize}
|
||||
|
||||
\func{wxSize}{GetSize}{\void}
|
||||
|
||||
|
||||
\membersection{wxSizerItem::CalcMin}\label{wxsizeritemcalcmin}
|
||||
|
||||
\func{wxSize}{CalcMin}{\void}
|
||||
|
||||
|
||||
\membersection{wxSizerItem::SetDimension}\label{wxsizeritemsetdimension}
|
||||
|
||||
\func{void}{SetDimension}{\param{wxPoint }{pos}, \param{wxSize }{size}}
|
||||
|
||||
|
||||
\membersection{wxSizerItem::IsWindow}\label{wxsizeritemiswindow}
|
||||
|
||||
\func{bool}{IsWindow}{\void}
|
||||
|
||||
|
||||
\membersection{wxSizerItem::IsSizer}\label{wxsizeritemissizer}
|
||||
|
||||
\func{bool}{IsSizer}{\void}
|
||||
|
||||
|
||||
\membersection{wxSizerItem::IsSpacer}\label{wxsizeritemisspacer}
|
||||
|
||||
\func{bool}{IsSpacer}{\void}
|
||||
|
||||
|
||||
\membersection{wxSizerItem::GetWindow}\label{wxsizeritemgetwindow}
|
||||
|
||||
\constfunc{wxWindow*}{GetWindow}{\void}
|
||||
|
||||
|
||||
\membersection{wxSizerItem::GetSizer}\label{wxsizeritemgetsizer}
|
||||
|
||||
\constfunc{wxSizer*}{GetSizer}{\void}
|
||||
|
||||
|
||||
\membersection{wxSizerItem::GetOption}\label{wxsizeritemgetoption}
|
||||
|
||||
\constfunc{int}{GetOption}{\void}
|
||||
|
||||
|
||||
\membersection{wxSizerItem::GetFlag}\label{wxsizeritemgetflag}
|
||||
|
||||
\constfunc{int}{GetFlag}{\void}
|
||||
|
||||
|
||||
\membersection{wxSizerItem::GetBorder}\label{wxsizeritemgetborder}
|
||||
|
||||
\constfunc{int}{GetBorder}{\void}
|
||||
|
@ -30,7 +30,7 @@ you can still use Ctrl-Enter to pass to the next control from the keyboard.}
|
||||
\twocolitem{\windowstyle{wxTE\_MULTILINE}}{The text control allows multiple lines.}
|
||||
\twocolitem{\windowstyle{wxTE\_PASSWORD}}{The text will be echoed as asterisks.}
|
||||
\twocolitem{\windowstyle{wxTE\_READONLY}}{The text will not be user-editable.}
|
||||
\twocolitem{\windowstyle{wxHSCROLL}}{A horizontal scrollbar will be created.}
|
||||
\twocolitem{\windowstyle{wxHSCROLL}}{A horizontal scrollbar will be created. No effect under GTK+.}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles} and
|
||||
@ -38,7 +38,8 @@ See also \helpref{window styles overview}{windowstyles} and
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
This class multiply-inherits from {\bf streambuf} where compilers allow, allowing code such as the following:
|
||||
This class multiply-inherits from {\bf streambuf} where compilers allow, allowing code such as
|
||||
the following:
|
||||
|
||||
{\small%
|
||||
\begin{verbatim}
|
||||
@ -51,8 +52,11 @@ This class multiply-inherits from {\bf streambuf} where compilers allow, allowin
|
||||
\end{verbatim}
|
||||
}%
|
||||
|
||||
If your compiler does not support derivation from {\bf streambuf} and gives a compile error, define the symbol {\bf NO\_TEXT\_WINDOW\_STREAM} in the
|
||||
wxTextCtrl header file.
|
||||
If your compiler does not support derivation from {\bf streambuf} and gives a compile error, define the symbol
|
||||
{\bf NO\_TEXT\_WINDOW\_STREAM} in the wxTextCtrl header file.
|
||||
|
||||
Note that any use of C++ iostreams (including this one) deprecated and might get completely removed
|
||||
in the future.
|
||||
|
||||
\wxheading{Event handling}
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include "wx/listctrl.h"
|
||||
#include "wx/textctrl.h"
|
||||
#include "wx/choice.h"
|
||||
#include "wx/checkbox.h"
|
||||
#include "wx/stattext.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// data
|
||||
@ -162,16 +164,18 @@ public:
|
||||
void OnTextEnter( wxCommandEvent &event );
|
||||
|
||||
protected:
|
||||
wxString m_message;
|
||||
long m_dialogStyle;
|
||||
wxString m_dir;
|
||||
wxString m_path; // Full path
|
||||
wxString m_fileName;
|
||||
wxString m_wildCard;
|
||||
int m_filterIndex;
|
||||
wxChoice *m_choice;
|
||||
wxTextCtrl *m_text;
|
||||
wxFileCtrl *m_list;
|
||||
wxString m_message;
|
||||
long m_dialogStyle;
|
||||
wxString m_dir;
|
||||
wxString m_path; // Full path
|
||||
wxString m_fileName;
|
||||
wxString m_wildCard;
|
||||
int m_filterIndex;
|
||||
wxChoice *m_choice;
|
||||
wxTextCtrl *m_text;
|
||||
wxFileCtrl *m_list;
|
||||
wxCheckBox *m_check;
|
||||
wxStaticText *m_static;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxFileDialog)
|
||||
|
@ -101,6 +101,7 @@ public:
|
||||
wxList m_menus;
|
||||
GtkWidget *m_menubar;
|
||||
long m_style;
|
||||
wxWindow *m_invokingWindow;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -101,6 +101,7 @@ public:
|
||||
wxList m_menus;
|
||||
GtkWidget *m_menubar;
|
||||
long m_style;
|
||||
wxWindow *m_invokingWindow;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -13,6 +13,8 @@ top_srcdir = @top_srcdir@
|
||||
top_builddir = ../..
|
||||
program_dir = samples/dialogs
|
||||
|
||||
DATAFILES=tips.txt
|
||||
|
||||
PROGRAM=dialogs
|
||||
|
||||
OBJECTS=$(PROGRAM).o
|
||||
|
@ -99,6 +99,9 @@ wxSizer *wxDialogBase::CreateButtonSizer( long flags )
|
||||
wxButton *cancel = (wxButton *) NULL;
|
||||
wxButton *yes = (wxButton *) NULL;
|
||||
wxButton *no = (wxButton *) NULL;
|
||||
|
||||
// always show an OK button, unless only YES_NO is given
|
||||
if ((flags & wxYES_NO) == 0) flags = flags | wxOK;
|
||||
|
||||
if (flags & wxYES_NO)
|
||||
{
|
||||
|
@ -553,7 +553,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent,
|
||||
const wxString& wildCard,
|
||||
long style,
|
||||
const wxPoint& pos ) :
|
||||
wxDialog( parent, -1, message, pos, wxDefaultSize, style | wxRESIZE_BORDER )
|
||||
wxDialog( parent, -1, message, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
|
||||
{
|
||||
wxBeginBusyCursor();
|
||||
|
||||
@ -632,6 +632,12 @@ wxFileDialog::wxFileDialog(wxWindow *parent,
|
||||
|
||||
mainsizer->Add( buttonsizer, 0, wxALL | wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer *staticsizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
staticsizer->Add( new wxStaticText( this, -1, _("Current directory:") ), 0, wxRIGHT, 10 );
|
||||
m_static = new wxStaticText( this, -1, m_dir );
|
||||
staticsizer->Add( m_static, 1 );
|
||||
mainsizer->Add( staticsizer, 0, wxEXPAND | wxLEFT|wxRIGHT|wxBOTTOM, 10 );
|
||||
|
||||
m_list = new wxFileCtrl( this, ID_LIST_CTRL, m_dir, firstWild, wxDefaultPosition, wxSize(440,180),
|
||||
wxLC_LIST | wxSUNKEN_BORDER | wxLC_SINGLE_SEL );
|
||||
mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 );
|
||||
@ -712,6 +718,8 @@ void wxFileDialog::OnListOk( wxCommandEvent &event )
|
||||
{
|
||||
m_list->GoToParentDir();
|
||||
m_list->SetFocus();
|
||||
m_list->GetDir( dir );
|
||||
m_static->SetLabel( dir );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -734,7 +742,9 @@ void wxFileDialog::OnListOk( wxCommandEvent &event )
|
||||
if (wxDirExists(filename))
|
||||
{
|
||||
m_list->GoToDir( filename );
|
||||
m_text->SetValue( _T("") );
|
||||
m_text->SetValue( _T("..") );
|
||||
m_list->GetDir( dir );
|
||||
m_static->SetLabel( dir );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -779,12 +789,18 @@ void wxFileDialog::OnUp( wxCommandEvent &WXUNUSED(event) )
|
||||
{
|
||||
m_list->GoToParentDir();
|
||||
m_list->SetFocus();
|
||||
wxString dir;
|
||||
m_list->GetDir( dir );
|
||||
m_static->SetLabel( dir );
|
||||
}
|
||||
|
||||
void wxFileDialog::OnHome( wxCommandEvent &WXUNUSED(event) )
|
||||
{
|
||||
m_list->GoToHomeDir();
|
||||
m_list->SetFocus();
|
||||
wxString dir;
|
||||
m_list->GetDir( dir );
|
||||
m_static->SetLabel( dir );
|
||||
}
|
||||
|
||||
void wxFileDialog::OnNew( wxCommandEvent &WXUNUSED(event) )
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "wx/settings.h"
|
||||
#include "wx/textctrl.h"
|
||||
#include "wx/statbmp.h"
|
||||
#include "wx/stattext.h"
|
||||
#include "wx/sizer.h"
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
@ -173,11 +174,10 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
|
||||
|
||||
wxButton *btnNext = new wxButton(this, wxID_NEXT_TIP, _("&Next"));
|
||||
|
||||
wxTextCtrl *text = new wxTextCtrl(this, -1, _("Did you know..."),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_READONLY | wxNO_BORDER);
|
||||
wxStaticText *text = new wxStaticText(this, -1, _("Did you know..."), wxDefaultPosition, wxSize(-1,25) );
|
||||
text->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxBOLD));
|
||||
text->SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE));
|
||||
//
|
||||
// text->SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE));
|
||||
|
||||
m_text = new wxTextCtrl(this, -1, _T(""),
|
||||
wxDefaultPosition, wxSize(200, 160),
|
||||
@ -198,16 +198,17 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
|
||||
|
||||
wxBoxSizer *icon_text = new wxBoxSizer( wxHORIZONTAL );
|
||||
icon_text->Add( bmp, 0, wxCENTER );
|
||||
icon_text->Add( text, 1, wxCENTER | wxLEFT, 10 );
|
||||
icon_text->Add( text, 1, wxCENTER | wxLEFT, 20 );
|
||||
topsizer->Add( icon_text, 0, wxEXPAND | wxALL, 10 );
|
||||
|
||||
topsizer->Add( m_text, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 );
|
||||
|
||||
wxBoxSizer *bottom = new wxBoxSizer( wxHORIZONTAL );
|
||||
bottom->Add( m_checkbox, 0, wxCENTER );
|
||||
bottom->Add( 10,10,1 );
|
||||
bottom->Add( btnNext, 0, wxCENTER | wxLEFT, 10 );
|
||||
bottom->Add( btnClose, 0, wxCENTER | wxLEFT, 10 );
|
||||
topsizer->Add( bottom, 0, wxALIGN_RIGHT | wxALL, 10 );
|
||||
topsizer->Add( bottom, 0, wxEXPAND | wxALL, 10 );
|
||||
|
||||
SetTipText();
|
||||
|
||||
|
@ -38,6 +38,7 @@ wxMenuBar::wxMenuBar( long style )
|
||||
/* the parent window is known after wxFrame::SetMenu() */
|
||||
m_needParent = FALSE;
|
||||
m_style = style;
|
||||
m_invokingWindow = (wxWindow*) NULL;
|
||||
|
||||
if (!PreCreation( (wxWindow*) NULL, wxDefaultPosition, wxDefaultSize ) ||
|
||||
!CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, _T("menubar") ))
|
||||
@ -76,6 +77,7 @@ wxMenuBar::wxMenuBar()
|
||||
/* the parent window is known after wxFrame::SetMenu() */
|
||||
m_needParent = FALSE;
|
||||
m_style = 0;
|
||||
m_invokingWindow = (wxWindow*) NULL;
|
||||
|
||||
if (!PreCreation( (wxWindow*) NULL, wxDefaultPosition, wxDefaultSize ) ||
|
||||
!CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("menubar") ))
|
||||
@ -152,6 +154,7 @@ static void wxMenubarSetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
|
||||
void wxMenuBar::SetInvokingWindow( wxWindow *win )
|
||||
{
|
||||
m_invokingWindow = win;
|
||||
#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
|
||||
wxWindow *top_frame = win;
|
||||
while (top_frame->GetParent())
|
||||
@ -172,6 +175,7 @@ void wxMenuBar::SetInvokingWindow( wxWindow *win )
|
||||
|
||||
void wxMenuBar::UnsetInvokingWindow( wxWindow *win )
|
||||
{
|
||||
m_invokingWindow = (wxWindow*) NULL;
|
||||
#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
|
||||
wxWindow *top_frame = win;
|
||||
while (top_frame->GetParent())
|
||||
@ -254,6 +258,11 @@ void wxMenuBar::Append( wxMenu *menu, const wxString &title )
|
||||
gtk_menu_bar_append( GTK_MENU_BAR(m_menubar), menu->m_owner );
|
||||
|
||||
#endif
|
||||
|
||||
// m_invokingWindow is set after wxFrame::SetMenuBar(). This call enables
|
||||
// adding menu later on.
|
||||
if (m_invokingWindow)
|
||||
wxMenubarSetInvokingWindow( menu, m_invokingWindow );
|
||||
}
|
||||
|
||||
static int FindMenuItemRecursive( const wxMenu *menu, const wxString &menuString, const wxString &itemString )
|
||||
|
@ -475,7 +475,7 @@ void wxRadioBox::Show( int item, bool show )
|
||||
gtk_widget_hide( button );
|
||||
}
|
||||
|
||||
wxString wxRadioBox::GetStringSelection(void) const
|
||||
wxString wxRadioBox::GetStringSelection() const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, _T(""), _T("invalid radiobox") );
|
||||
|
||||
@ -506,12 +506,12 @@ bool wxRadioBox::SetStringSelection( const wxString &s )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int wxRadioBox::Number(void) const
|
||||
int wxRadioBox::Number() const
|
||||
{
|
||||
return m_boxes.Number();
|
||||
}
|
||||
|
||||
int wxRadioBox::GetNumberOfRowsOrCols(void) const
|
||||
int wxRadioBox::GetNumberOfRowsOrCols() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ wxMenuBar::wxMenuBar( long style )
|
||||
/* the parent window is known after wxFrame::SetMenu() */
|
||||
m_needParent = FALSE;
|
||||
m_style = style;
|
||||
m_invokingWindow = (wxWindow*) NULL;
|
||||
|
||||
if (!PreCreation( (wxWindow*) NULL, wxDefaultPosition, wxDefaultSize ) ||
|
||||
!CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, _T("menubar") ))
|
||||
@ -76,6 +77,7 @@ wxMenuBar::wxMenuBar()
|
||||
/* the parent window is known after wxFrame::SetMenu() */
|
||||
m_needParent = FALSE;
|
||||
m_style = 0;
|
||||
m_invokingWindow = (wxWindow*) NULL;
|
||||
|
||||
if (!PreCreation( (wxWindow*) NULL, wxDefaultPosition, wxDefaultSize ) ||
|
||||
!CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("menubar") ))
|
||||
@ -152,6 +154,7 @@ static void wxMenubarSetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
|
||||
void wxMenuBar::SetInvokingWindow( wxWindow *win )
|
||||
{
|
||||
m_invokingWindow = win;
|
||||
#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
|
||||
wxWindow *top_frame = win;
|
||||
while (top_frame->GetParent())
|
||||
@ -172,6 +175,7 @@ void wxMenuBar::SetInvokingWindow( wxWindow *win )
|
||||
|
||||
void wxMenuBar::UnsetInvokingWindow( wxWindow *win )
|
||||
{
|
||||
m_invokingWindow = (wxWindow*) NULL;
|
||||
#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
|
||||
wxWindow *top_frame = win;
|
||||
while (top_frame->GetParent())
|
||||
@ -254,6 +258,11 @@ void wxMenuBar::Append( wxMenu *menu, const wxString &title )
|
||||
gtk_menu_bar_append( GTK_MENU_BAR(m_menubar), menu->m_owner );
|
||||
|
||||
#endif
|
||||
|
||||
// m_invokingWindow is set after wxFrame::SetMenuBar(). This call enables
|
||||
// adding menu later on.
|
||||
if (m_invokingWindow)
|
||||
wxMenubarSetInvokingWindow( menu, m_invokingWindow );
|
||||
}
|
||||
|
||||
static int FindMenuItemRecursive( const wxMenu *menu, const wxString &menuString, const wxString &itemString )
|
||||
|
@ -475,7 +475,7 @@ void wxRadioBox::Show( int item, bool show )
|
||||
gtk_widget_hide( button );
|
||||
}
|
||||
|
||||
wxString wxRadioBox::GetStringSelection(void) const
|
||||
wxString wxRadioBox::GetStringSelection() const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, _T(""), _T("invalid radiobox") );
|
||||
|
||||
@ -506,12 +506,12 @@ bool wxRadioBox::SetStringSelection( const wxString &s )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int wxRadioBox::Number(void) const
|
||||
int wxRadioBox::Number() const
|
||||
{
|
||||
return m_boxes.Number();
|
||||
}
|
||||
|
||||
int wxRadioBox::GetNumberOfRowsOrCols(void) const
|
||||
int wxRadioBox::GetNumberOfRowsOrCols() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user