Corrected some more docs,
Corrected size of spinbutton wxWindow::PopUp() now doesn't return control to the program until the menu disappears as it is documented and done by wxMSW git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
4dcaf11a7b
commit
2259e00789
@ -43,15 +43,21 @@ Copy constructor.
|
||||
\func{}{wxBitmap}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
|
||||
|
||||
Creates a bitmap from the given data, which can be of arbitrary type.
|
||||
Windows only, I think.
|
||||
|
||||
\func{}{wxBitmap}{\param{const char}{ bits[]}, \param{int}{ width}, \param{int}{ height}\\
|
||||
\param{int}{ depth = 1}}
|
||||
|
||||
Creates a bitmap from an array of bits.
|
||||
Creates a bitmap from an array of bits.
|
||||
|
||||
Note that the bit depth is ignored on GTK+ and Motif. If you want to create a bitmap
|
||||
from something else than a 1-bit data array, use the \helpref{wxImage}{wximage} class.
|
||||
|
||||
\func{}{wxBitmap}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
|
||||
|
||||
Creates a new bitmap.
|
||||
Creates a new bitmap. A depth of -1 indicates the depth of the current screen or
|
||||
visual. Some platforms only support 1 for monochrome and -1 for the current colour
|
||||
setting.
|
||||
|
||||
\func{}{wxBitmap}{\param{const char**}{ bits}}
|
||||
|
||||
|
@ -287,17 +287,9 @@ typedef enum {
|
||||
|
||||
Returns the word value of the expression.
|
||||
|
||||
\membersection{wxExpr::WriteLispExpr}\label{wxexprwritelistexpr}
|
||||
\membersection{wxExpr::WriteClause}\label{wxexprwriteprologclause}
|
||||
|
||||
\func{void}{WriteLispExpr}{\param{ostream\&}{ stream}}
|
||||
|
||||
Writes the expression or clause to the given stream in LISP format.
|
||||
Not normally needed, since the whole {\bf wxExprDatabase} will usually
|
||||
be written at once. Lists are enclosed in parentheses will no commas.
|
||||
|
||||
\membersection{wxExpr::WritePrologClause}\label{wxexprwriteprologclause}
|
||||
|
||||
\func{void}{WritePrologClause}{\param{ostream\&}{ stream}}
|
||||
\func{void}{WriteClause}{\param{FILE *}{ stream}}
|
||||
|
||||
Writes the clause to the given stream in Prolog format. Not normally needed, since
|
||||
the whole {\bf wxExprDatabase} will usually be written at once. The format is:
|
||||
@ -306,7 +298,7 @@ full stop.
|
||||
|
||||
\membersection{wxExpr::WriteExpr}\label{wxexprwriteexpr}
|
||||
|
||||
\func{void}{WriteExpr}{\param{ostream\&}{ stream}}
|
||||
\func{void}{WriteExpr}{\param{FILE *}{ stream}}
|
||||
|
||||
Writes the expression (not clause) to the given stream in Prolog
|
||||
format. Not normally needed, since the whole {\bf wxExprDatabase} will
|
||||
@ -494,15 +486,9 @@ Reads in the given file, returning TRUE if successful.
|
||||
Reads a Prolog database from the given string buffer, returning TRUE if
|
||||
successful.
|
||||
|
||||
\membersection{wxExprDatabase::WriteLisp}\label{wxexprdatabasewritelisp}
|
||||
|
||||
\func{bool}{WriteLisp}{\param{ostream\& }{stream}}
|
||||
|
||||
Writes the database as a LISP-format file.
|
||||
|
||||
\membersection{wxExprDatabase::Write}\label{wxexprdatabasewrite}
|
||||
|
||||
\func{bool}{Write}{\param{ostream\& }{stream}}
|
||||
\func{bool}{Write}{\param{FILE *}{stream}}
|
||||
|
||||
\func{bool}{Write}{\param{const wxString\&}{ filename}}
|
||||
|
||||
|
@ -97,9 +97,6 @@ the style is wxDOT, wxLONG\_DASH, wxSHORT\_DASH, wxDOT\_DASH, or wxUSER\_DASH.}
|
||||
|
||||
\docparam{pen}{A pointer or reference to a pen to copy.}
|
||||
|
||||
\docparam{width}{Pen width. Under Windows, the pen width cannot be greater than 1 if
|
||||
the style is wxDOT, wxLONG\_DASH, wxSHORT\_DASH, wxDOT\_DASH, or wxUSER\_DASH.}
|
||||
|
||||
\docparam{style}{The style may be one of the following:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
@ -121,12 +118,13 @@ the style is wxDOT, wxLONG\_DASH, wxSHORT\_DASH, wxDOT\_DASH, or wxUSER\_DASH.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Different versions of Windows and different versions of other platforms
|
||||
support {\it very} different subsets of the styles above - there is no
|
||||
similarity even between Windows95 and Windows98 - so handle with care.
|
||||
|
||||
If the named colour form is used, an appropriate {\bf wxColour} structure
|
||||
is found in the colour database.
|
||||
|
||||
{\it style} may be one of wxSOLID, wxDOT, wxLONG\_DASH, wxSHORT\_DASH and
|
||||
wxDOT\_DASH.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxPen::SetStyle}{wxpensetstyle}, \helpref{wxPen::SetColour}{wxpensetcolour},\rtfsp
|
||||
|
@ -35,11 +35,5 @@ get PostScript printing settings.
|
||||
This constructor and the global printer settings are now deprecated;
|
||||
use the wxPrintData constructor instead.
|
||||
|
||||
\membersection{wxPostScriptDC::GetStream}
|
||||
|
||||
\func{ostream *}{GetStream}{\void}
|
||||
|
||||
Returns the stream currently being used to write PostScript output. Use this
|
||||
to insert any PostScript code that is outside the scope of wxPostScriptDC.
|
||||
|
||||
|
||||
|
@ -1520,7 +1520,8 @@ processed as usually.
|
||||
\wxheading{Remarks}
|
||||
|
||||
Just before the menu is popped up, \helpref{wxMenu::UpdateUI}{wxmenuupdateui} is called
|
||||
to ensure that the menu items are in the correct state.
|
||||
to ensure that the menu items are in the correct state. The menu does not get deleted
|
||||
by the window.
|
||||
|
||||
\membersection{wxWindow::PushEventHandler}\label{wxwindowpusheventhandler}
|
||||
|
||||
@ -1597,6 +1598,19 @@ functions so should not be required by the application programmer.
|
||||
|
||||
\docparam{child}{Child window to remove.}
|
||||
|
||||
\membersection{wxWindow::Reparent}\label{wxwindowreparent}
|
||||
|
||||
\func{virtual bool}{Reparent}{\param{wxWindow* }{newParent}}
|
||||
|
||||
Reparents the window, i.e the window will be removed from its
|
||||
current parent window (e.g. a non-standard toolbar in a wxFrame)
|
||||
and then re-inserted into another (e.g. a wxMiniFrame for a
|
||||
floating toolbar). Available on Windows and GTK+.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{newParent}{New parent.}
|
||||
|
||||
\membersection{wxWindow::ScreenToClient}\label{wxwindowscreentoclient}
|
||||
|
||||
\constfunc{virtual void}{ScreenToClient}{\param{int* }{x}, \param{int* }{y}}
|
||||
|
@ -98,7 +98,7 @@ bool wxSpinButton::Create(wxWindow *parent,
|
||||
if (new_size.y == -1)
|
||||
new_size.y = 30;
|
||||
|
||||
if (!PreCreation( parent, pos, size ) ||
|
||||
if (!PreCreation( parent, pos, new_size ) ||
|
||||
!CreateBase( parent, id, pos, new_size, style, wxDefaultValidator, name ))
|
||||
{
|
||||
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||
|
@ -2845,6 +2845,15 @@ void wxWindow::ApplyWidgetStyle()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Pop-up menu stuff
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting )
|
||||
{
|
||||
*is_waiting = FALSE;
|
||||
}
|
||||
|
||||
static void SetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
{
|
||||
menu->SetInvokingWindow( win );
|
||||
@ -2885,6 +2894,11 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
gs_pop_x = x;
|
||||
gs_pop_y = y;
|
||||
|
||||
bool is_waiting = TRUE;
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(menu->m_menu), "hide",
|
||||
GTK_SIGNAL_FUNC(gtk_pop_hide_callback), (gpointer)&is_waiting );
|
||||
|
||||
gtk_menu_popup(
|
||||
GTK_MENU(menu->m_menu),
|
||||
(GtkWidget *) NULL, // parent menu shell
|
||||
@ -2894,6 +2908,9 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
0, // button used to activate it
|
||||
0 //gs_timeLastClick // the time of activation
|
||||
);
|
||||
|
||||
while (is_waiting) wxYield();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ bool wxSpinButton::Create(wxWindow *parent,
|
||||
if (new_size.y == -1)
|
||||
new_size.y = 30;
|
||||
|
||||
if (!PreCreation( parent, pos, size ) ||
|
||||
if (!PreCreation( parent, pos, new_size ) ||
|
||||
!CreateBase( parent, id, pos, new_size, style, wxDefaultValidator, name ))
|
||||
{
|
||||
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||
|
@ -2845,6 +2845,15 @@ void wxWindow::ApplyWidgetStyle()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Pop-up menu stuff
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting )
|
||||
{
|
||||
*is_waiting = FALSE;
|
||||
}
|
||||
|
||||
static void SetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
{
|
||||
menu->SetInvokingWindow( win );
|
||||
@ -2885,6 +2894,11 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
gs_pop_x = x;
|
||||
gs_pop_y = y;
|
||||
|
||||
bool is_waiting = TRUE;
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(menu->m_menu), "hide",
|
||||
GTK_SIGNAL_FUNC(gtk_pop_hide_callback), (gpointer)&is_waiting );
|
||||
|
||||
gtk_menu_popup(
|
||||
GTK_MENU(menu->m_menu),
|
||||
(GtkWidget *) NULL, // parent menu shell
|
||||
@ -2894,6 +2908,9 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
0, // button used to activate it
|
||||
0 //gs_timeLastClick // the time of activation
|
||||
);
|
||||
|
||||
while (is_waiting) wxYield();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user