Next take at getting mini-frames even with Life! to work...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -38,7 +38,7 @@ application windows.
|
|||||||
\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Unix only).}
|
\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Unix only).}
|
||||||
\twocolitem{\windowstyle{wxFRAME\_FLOAT\_ON\_PARENT}}{Causes the frame to be above the parent window in the
|
\twocolitem{\windowstyle{wxFRAME\_FLOAT\_ON\_PARENT}}{Causes the frame to be above the parent window in the
|
||||||
z-order and not shown in the taskbar. Without this style, frames are created as top-level windows that may be obscured by
|
z-order and not shown in the taskbar. Without this style, frames are created as top-level windows that may be obscured by
|
||||||
the parent window, and frame titles are shown in the taskbar. Windows only. }
|
the parent window, and frame titles are shown in the taskbar. Windows and GTK. }
|
||||||
\twocolitem{\windowstyle{wxFRAME\_TOOL\_WINDOW}}{Causes a frame with a small titlebar to be created;
|
\twocolitem{\windowstyle{wxFRAME\_TOOL\_WINDOW}}{Causes a frame with a small titlebar to be created;
|
||||||
the frame title does not appear in the taskbar. Windows only. }
|
the frame title does not appear in the taskbar. Windows only. }
|
||||||
\end{twocollist}
|
\end{twocollist}
|
||||||
|
@@ -253,9 +253,9 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
|||||||
position in "realize" */
|
position in "realize" */
|
||||||
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
|
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
|
||||||
|
|
||||||
if (win->m_miniEdge > 0)
|
if ((win->m_miniEdge > 0) || (win->HasFlag(wxSIMPLE_BORDER)))
|
||||||
{
|
{
|
||||||
/* This is a mini-frame. */
|
/* This is a mini-frame or a borderless frame. */
|
||||||
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)0 );
|
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)0 );
|
||||||
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)0 );
|
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)0 );
|
||||||
}
|
}
|
||||||
@@ -440,10 +440,12 @@ bool wxFrame::Create( wxWindow *parent,
|
|||||||
m_insertCallback = (wxInsertChildFunction) wxInsertChildInFrame;
|
m_insertCallback = (wxInsertChildFunction) wxInsertChildInFrame;
|
||||||
|
|
||||||
GtkWindowType win_type = GTK_WINDOW_TOPLEVEL;
|
GtkWindowType win_type = GTK_WINDOW_TOPLEVEL;
|
||||||
if (style & wxSIMPLE_BORDER) win_type = GTK_WINDOW_POPUP;
|
|
||||||
|
|
||||||
m_widget = gtk_window_new( win_type );
|
m_widget = gtk_window_new( win_type );
|
||||||
|
|
||||||
|
if ((m_parent) && (HasFlag(wxFRAME_FLOAT_ON_PARENT)) && (GTK_IS_WINDOW(m_parent->m_widget)))
|
||||||
|
gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) );
|
||||||
|
|
||||||
if (!name.IsEmpty())
|
if (!name.IsEmpty())
|
||||||
gtk_window_set_wmclass( GTK_WINDOW(m_widget), name.mb_str(), name.mb_str() );
|
gtk_window_set_wmclass( GTK_WINDOW(m_widget), name.mb_str(), name.mb_str() );
|
||||||
|
|
||||||
|
@@ -303,8 +303,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
|
|||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
// style = style | wxSIMPLE_BORDER;
|
style = style | wxCAPTION | wxFRAME_FLOAT_ON_PARENT;
|
||||||
style = style | wxCAPTION;
|
|
||||||
|
|
||||||
if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))
|
if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))
|
||||||
m_miniTitle = 13;
|
m_miniTitle = 13;
|
||||||
@@ -318,9 +317,6 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
|
|||||||
|
|
||||||
wxFrame::Create( parent, id, title, pos, size, style, name );
|
wxFrame::Create( parent, id, title, pos, size, style, name );
|
||||||
|
|
||||||
if ((m_parent) && (GTK_IS_WINDOW(m_parent->m_widget)))
|
|
||||||
gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) );
|
|
||||||
|
|
||||||
if ((style & wxSYSTEM_MENU) &&
|
if ((style & wxSYSTEM_MENU) &&
|
||||||
((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT)))
|
((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT)))
|
||||||
{
|
{
|
||||||
|
@@ -253,9 +253,9 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
|||||||
position in "realize" */
|
position in "realize" */
|
||||||
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
|
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
|
||||||
|
|
||||||
if (win->m_miniEdge > 0)
|
if ((win->m_miniEdge > 0) || (win->HasFlag(wxSIMPLE_BORDER)))
|
||||||
{
|
{
|
||||||
/* This is a mini-frame. */
|
/* This is a mini-frame or a borderless frame. */
|
||||||
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)0 );
|
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)0 );
|
||||||
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)0 );
|
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)0 );
|
||||||
}
|
}
|
||||||
@@ -440,10 +440,12 @@ bool wxFrame::Create( wxWindow *parent,
|
|||||||
m_insertCallback = (wxInsertChildFunction) wxInsertChildInFrame;
|
m_insertCallback = (wxInsertChildFunction) wxInsertChildInFrame;
|
||||||
|
|
||||||
GtkWindowType win_type = GTK_WINDOW_TOPLEVEL;
|
GtkWindowType win_type = GTK_WINDOW_TOPLEVEL;
|
||||||
if (style & wxSIMPLE_BORDER) win_type = GTK_WINDOW_POPUP;
|
|
||||||
|
|
||||||
m_widget = gtk_window_new( win_type );
|
m_widget = gtk_window_new( win_type );
|
||||||
|
|
||||||
|
if ((m_parent) && (HasFlag(wxFRAME_FLOAT_ON_PARENT)) && (GTK_IS_WINDOW(m_parent->m_widget)))
|
||||||
|
gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) );
|
||||||
|
|
||||||
if (!name.IsEmpty())
|
if (!name.IsEmpty())
|
||||||
gtk_window_set_wmclass( GTK_WINDOW(m_widget), name.mb_str(), name.mb_str() );
|
gtk_window_set_wmclass( GTK_WINDOW(m_widget), name.mb_str(), name.mb_str() );
|
||||||
|
|
||||||
|
@@ -303,8 +303,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
|
|||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
// style = style | wxSIMPLE_BORDER;
|
style = style | wxCAPTION | wxFRAME_FLOAT_ON_PARENT;
|
||||||
style = style | wxCAPTION;
|
|
||||||
|
|
||||||
if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))
|
if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))
|
||||||
m_miniTitle = 13;
|
m_miniTitle = 13;
|
||||||
@@ -318,9 +317,6 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
|
|||||||
|
|
||||||
wxFrame::Create( parent, id, title, pos, size, style, name );
|
wxFrame::Create( parent, id, title, pos, size, style, name );
|
||||||
|
|
||||||
if ((m_parent) && (GTK_IS_WINDOW(m_parent->m_widget)))
|
|
||||||
gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) );
|
|
||||||
|
|
||||||
if ((style & wxSYSTEM_MENU) &&
|
if ((style & wxSYSTEM_MENU) &&
|
||||||
((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT)))
|
((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT)))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user