unified wxFRAME_EX_CONTEXTHELP and wxDIALOG_EX_CONTEXTHELP in a single wxWS_EX_CONTEXTHELP and changed its value to avoid conflict with wxWS_EX_TRANSIENT (this resulted in all progress dialogs having useless context help button in their title bar)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-08-06 12:56:48 +00:00
parent 98e7a7f97f
commit 7ce6cc9b8e
4 changed files with 18 additions and 18 deletions

View File

@@ -2799,14 +2799,12 @@ default for the reasons explained in the
window from being used as an implicit parent for the dialogs which were
created without a parent. It is useful for the windows which can disappear at
any moment as creating children of such windows results in fatal problems.}
\twocolitem{\windowstyle{wxFRAME\_EX\_CONTEXTHELP}}{Under Windows, puts a query button on the
caption. When pressed, Windows will go into a context-sensitive help mode and wxWidgets will send
a wxEVT\_HELP event if the user clicked on an application window.
\twocolitem{\windowstyle{wxWS\_EX\_CONTEXTHELP}}{Under Windows, puts a query
button on the caption. When pressed, Windows will go into a context-sensitive
help mode and wxWidgets will send a wxEVT\_HELP event if the user clicked on an
application window.
This style cannot be used together with wxMAXIMIZE\_BOX or wxMINIMIZE\_BOX, so
you should use the style of
{\tt wxDEFAULT\_FRAME\_STYLE \& \textasciitilde(wxMINIMIZE\_BOX | wxMAXIMIZE\_BOX)} for the
frames having this style (the dialogs don't have minimize nor maximize box by
default)}
these two styles are automatically turned of if this one is used.}
\twocolitem{\windowstyle{wxWS\_EX\_PROCESS\_IDLE}}{This window should always process idle events, even
if the mode set by \helpref{wxIdleEvent::SetMode}{wxidleeventsetmode} is wxIDLE\_PROCESS\_SPECIFIED.}
\twocolitem{\windowstyle{wxWS\_EX\_PROCESS\_UI\_UPDATES}}{This window should always process UI update events,

View File

@@ -1513,15 +1513,18 @@ enum wxBorder
/* this window should always process UI update events */
#define wxWS_EX_PROCESS_UI_UPDATES 0x00000020
/* Use this style to add a context-sensitive help to the window (currently for */
/* Win32 only and it doesn't work if wxMINIMIZE_BOX or wxMAXIMIZE_BOX are used) */
#define wxFRAME_EX_CONTEXTHELP 0x00000004
#define wxDIALOG_EX_CONTEXTHELP 0x00000004
/* Draw the window in a metal theme on Mac */
#define wxFRAME_EX_METAL 0x00000040
#define wxDIALOG_EX_METAL 0x00000040
/* Use this style to add a context-sensitive help to the window (currently for */
/* Win32 only and it doesn't work if wxMINIMIZE_BOX or wxMAXIMIZE_BOX are used) */
#define wxWS_EX_CONTEXTHELP 0x00000080
/* synonyms for wxWS_EX_CONTEXTHELP for compatibility */
#define wxFRAME_EX_CONTEXTHELP wxWS_EX_CONTEXTHELP
#define wxDIALOG_EX_CONTEXTHELP wxWS_EX_CONTEXTHELP
/* Create a window which is attachable to another top level window */
#define wxFRAME_DRAWER 0x0020

View File

@@ -210,10 +210,10 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const
// WS_EX_CONTEXTHELP is incompatible with WS_MINIMIZEBOX and WS_MAXIMIZEBOX
// and is ignored if we specify both of them, but chances are that if we
// use wxFRAME_EX_CONTEXTHELP, we really do want to have the context help
// use wxWS_EX_CONTEXTHELP, we really do want to have the context help
// button while wxMINIMIZE/wxMAXIMIZE are included by default, so the help
// takes precedence
if ( !(GetExtraStyle() & wxFRAME_EX_CONTEXTHELP) )
if ( !(GetExtraStyle() & wxWS_EX_CONTEXTHELP) )
{
if ( style & wxMINIMIZE_BOX )
msflags |= WS_MINIMIZEBOX;
@@ -273,7 +273,7 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const
//else: nothing to do [here]
}
if ( GetExtraStyle() & wxFRAME_EX_CONTEXTHELP )
if ( GetExtraStyle() & wxWS_EX_CONTEXTHELP )
*exflags |= WS_EX_CONTEXTHELP;
#endif // !__WXWINCE__

View File

@@ -97,8 +97,7 @@ bool wxTopLevelWindow::Create(wxWindow *parent,
wxSYSTEM_MENU | wxRESIZE_BORDER | wxFRAME_TOOL_WINDOW |
wxRESIZE_BORDER);
style |= wxSIMPLE_BORDER;
SetExtraStyle(exstyleOrig &
~(wxFRAME_EX_CONTEXTHELP | wxDIALOG_EX_CONTEXTHELP));
SetExtraStyle(exstyleOrig & ~wxWS_EX_CONTEXTHELP);
}
if ( !wxTopLevelWindowNative::Create(parent, id, title, pos,
@@ -154,7 +153,7 @@ long wxTopLevelWindow::GetDecorationsStyle() const
style |= wxTOPLEVEL_BUTTON_MAXIMIZE;
}
#if wxUSE_HELP
if ( m_exStyle & (wxFRAME_EX_CONTEXTHELP | wxDIALOG_EX_CONTEXTHELP))
if ( m_exStyle & wxWS_EX_CONTEXTHELP)
style |= wxTOPLEVEL_BUTTON_HELP;
#endif
}