Added IsTopLevel() as a virtual function.
Added fontenum.hto filelist.txt, Changed window positioning code again, some more related things. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
17
Makefile.in
17
Makefile.in
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# This file was automatically generated by tmake at 18:34, 1999/11/01
|
||||
# This file was automatically generated by tmake at 16:44, 1999/11/05
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T!
|
||||
|
||||
#
|
||||
@@ -222,6 +222,9 @@ WX_HEADERS = \
|
||||
filesys.h \
|
||||
font.h \
|
||||
fontdlg.h \
|
||||
fontenum.h \
|
||||
fontmap.h \
|
||||
fontutil.h \
|
||||
frame.h \
|
||||
fs_inet.h \
|
||||
fs_zip.h \
|
||||
@@ -646,6 +649,7 @@ GTK_GENERICOBJS = \
|
||||
scrolwin.o \
|
||||
splitter.o \
|
||||
statusbr.o \
|
||||
tabg.o \
|
||||
textdlgg.o \
|
||||
tipdlg.o \
|
||||
treectrl.o \
|
||||
@@ -680,6 +684,7 @@ GTK_GENERICDEPS = \
|
||||
scrolwin.d \
|
||||
splitter.d \
|
||||
statusbr.d \
|
||||
tabg.d \
|
||||
textdlgg.d \
|
||||
tipdlg.d \
|
||||
treectrl.d \
|
||||
@@ -713,6 +718,7 @@ GTK_COMMONOBJS = \
|
||||
filefn.o \
|
||||
filesys.o \
|
||||
fontcmn.o \
|
||||
fontmap.o \
|
||||
framecmn.o \
|
||||
fs_inet.o \
|
||||
fs_zip.o \
|
||||
@@ -808,6 +814,7 @@ GTK_COMMONDEPS = \
|
||||
filefn.d \
|
||||
filesys.d \
|
||||
fontcmn.d \
|
||||
fontmap.d \
|
||||
framecmn.d \
|
||||
fs_inet.d \
|
||||
fs_zip.d \
|
||||
@@ -1099,6 +1106,7 @@ MOTIF_COMMONOBJS = \
|
||||
filefn.o \
|
||||
filesys.o \
|
||||
fontcmn.o \
|
||||
fontmap.o \
|
||||
framecmn.o \
|
||||
fs_inet.o \
|
||||
fs_zip.o \
|
||||
@@ -1194,6 +1202,7 @@ MOTIF_COMMONDEPS = \
|
||||
filefn.d \
|
||||
filesys.d \
|
||||
fontcmn.d \
|
||||
fontmap.d \
|
||||
framecmn.d \
|
||||
fs_inet.d \
|
||||
fs_zip.d \
|
||||
@@ -1443,6 +1452,7 @@ MSW_COMMONOBJS = \
|
||||
filefn.o \
|
||||
filesys.o \
|
||||
fontcmn.o \
|
||||
fontmap.o \
|
||||
framecmn.o \
|
||||
fs_inet.o \
|
||||
fs_zip.o \
|
||||
@@ -1539,6 +1549,7 @@ MSW_COMMONDEPS = \
|
||||
filefn.d \
|
||||
filesys.d \
|
||||
fontcmn.d \
|
||||
fontmap.d \
|
||||
framecmn.d \
|
||||
fs_inet.d \
|
||||
fs_zip.d \
|
||||
@@ -1639,6 +1650,7 @@ MSW_GUIOBJS = \
|
||||
filedlg.o \
|
||||
font.o \
|
||||
fontdlg.o \
|
||||
fontutil.o \
|
||||
frame.o \
|
||||
gauge95.o \
|
||||
gdiobj.o \
|
||||
@@ -1726,6 +1738,7 @@ MSW_GUIDEPS = \
|
||||
filedlg.d \
|
||||
font.d \
|
||||
fontdlg.d \
|
||||
fontutil.d \
|
||||
frame.d \
|
||||
gauge95.d \
|
||||
gdiobj.d \
|
||||
@@ -1894,6 +1907,7 @@ HTMLDEPS = \
|
||||
UNIX_OBJS = \
|
||||
dialup.o \
|
||||
fontenum.o \
|
||||
fontutil.o \
|
||||
gsocket.o \
|
||||
threadpsx.o \
|
||||
utilsunx.o
|
||||
@@ -1901,6 +1915,7 @@ UNIX_OBJS = \
|
||||
UNIX_DEPS = \
|
||||
dialup.d \
|
||||
fontenum.d \
|
||||
fontutil.d \
|
||||
gsocket.d \
|
||||
threadpsx.d \
|
||||
utilsunx.d
|
||||
|
@@ -481,8 +481,9 @@ filedlg.h W
|
||||
filefn.h W
|
||||
filesys.h W
|
||||
font.h W
|
||||
fontdlg.h W
|
||||
fontenum.h W
|
||||
fontmap.h W
|
||||
fontdlg.h W
|
||||
fontutil.h W
|
||||
frame.h W
|
||||
fs_inet.h W
|
||||
|
@@ -85,6 +85,8 @@ public:
|
||||
virtual void Maximize() { }
|
||||
virtual void Restore() { }
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
|
||||
// implementation
|
||||
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
|
@@ -97,6 +97,8 @@ public:
|
||||
virtual void Iconize( bool iconize );
|
||||
virtual bool IsIconized() const;
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
|
||||
virtual void Command( int id );
|
||||
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
|
@@ -44,12 +44,7 @@ extern const wxChar* wxStatusLineNameStr;
|
||||
|
||||
class wxMDIParentFrame: public wxFrame
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||
|
||||
friend class wxMDIChildFrame;
|
||||
|
||||
public:
|
||||
|
||||
wxMDIParentFrame();
|
||||
wxMDIParentFrame( wxWindow *parent,
|
||||
wxWindowID id, const wxString& title,
|
||||
@@ -63,7 +58,6 @@ public:
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr );
|
||||
|
||||
|
||||
void GetClientSize(int *width, int *height) const;
|
||||
wxMDIChildFrame *GetActiveChild() const;
|
||||
|
||||
@@ -87,6 +81,10 @@ public:
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
private:
|
||||
friend class wxMDIChildFrame;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
@@ -96,10 +94,7 @@ public:
|
||||
|
||||
class wxMDIChildFrame: public wxFrame
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
wxMDIChildFrame();
|
||||
wxMDIChildFrame( wxMDIParentFrame *parent,
|
||||
wxWindowID id, const wxString& title,
|
||||
@@ -155,6 +150,8 @@ class wxMDIChildFrame: public wxFrame
|
||||
virtual void Maximize( bool WXUNUSED(maximize) ) {}
|
||||
virtual void Restore() {}
|
||||
|
||||
virtual bool IsTopLevel() const { return FALSE; }
|
||||
|
||||
void OnActivate( wxActivateEvent &event );
|
||||
|
||||
// implementation
|
||||
@@ -163,7 +160,9 @@ class wxMDIChildFrame: public wxFrame
|
||||
GtkNotebookPage *m_page;
|
||||
bool m_justInserted;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -172,14 +171,14 @@ class wxMDIChildFrame: public wxFrame
|
||||
|
||||
class wxMDIClientWindow: public wxWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
|
||||
|
||||
public:
|
||||
|
||||
wxMDIClientWindow();
|
||||
wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 );
|
||||
~wxMDIClientWindow();
|
||||
virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
|
||||
};
|
||||
|
||||
#endif // __MDIH__
|
||||
|
@@ -85,6 +85,8 @@ public:
|
||||
virtual void Maximize() { }
|
||||
virtual void Restore() { }
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
|
||||
// implementation
|
||||
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
|
@@ -97,6 +97,8 @@ public:
|
||||
virtual void Iconize( bool iconize );
|
||||
virtual bool IsIconized() const;
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
|
||||
virtual void Command( int id );
|
||||
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
|
@@ -44,12 +44,7 @@ extern const wxChar* wxStatusLineNameStr;
|
||||
|
||||
class wxMDIParentFrame: public wxFrame
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||
|
||||
friend class wxMDIChildFrame;
|
||||
|
||||
public:
|
||||
|
||||
wxMDIParentFrame();
|
||||
wxMDIParentFrame( wxWindow *parent,
|
||||
wxWindowID id, const wxString& title,
|
||||
@@ -63,7 +58,6 @@ public:
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr );
|
||||
|
||||
|
||||
void GetClientSize(int *width, int *height) const;
|
||||
wxMDIChildFrame *GetActiveChild() const;
|
||||
|
||||
@@ -87,6 +81,10 @@ public:
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
private:
|
||||
friend class wxMDIChildFrame;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
@@ -96,10 +94,7 @@ public:
|
||||
|
||||
class wxMDIChildFrame: public wxFrame
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
wxMDIChildFrame();
|
||||
wxMDIChildFrame( wxMDIParentFrame *parent,
|
||||
wxWindowID id, const wxString& title,
|
||||
@@ -155,6 +150,8 @@ class wxMDIChildFrame: public wxFrame
|
||||
virtual void Maximize( bool WXUNUSED(maximize) ) {}
|
||||
virtual void Restore() {}
|
||||
|
||||
virtual bool IsTopLevel() const { return FALSE; }
|
||||
|
||||
void OnActivate( wxActivateEvent &event );
|
||||
|
||||
// implementation
|
||||
@@ -163,7 +160,9 @@ class wxMDIChildFrame: public wxFrame
|
||||
GtkNotebookPage *m_page;
|
||||
bool m_justInserted;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -172,14 +171,14 @@ class wxMDIChildFrame: public wxFrame
|
||||
|
||||
class wxMDIClientWindow: public wxWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
|
||||
|
||||
public:
|
||||
|
||||
wxMDIClientWindow();
|
||||
wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 );
|
||||
~wxMDIClientWindow();
|
||||
virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
|
||||
};
|
||||
|
||||
#endif // __MDIH__
|
||||
|
@@ -66,6 +66,8 @@ public:
|
||||
|
||||
virtual bool IsIconized() const;
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const ;
|
||||
|
||||
|
@@ -78,6 +78,8 @@ public:
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const { return m_title; }
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
|
||||
void Centre(int direction = wxBOTH);
|
||||
|
||||
// Call this to simulate a menu command
|
||||
|
@@ -169,6 +169,8 @@ public:
|
||||
virtual void Activate();
|
||||
virtual bool IsIconized() const ;
|
||||
|
||||
virtual bool IsTopLevel() const { return FALSE; }
|
||||
|
||||
// Is the frame maximized? Returns TRUE for
|
||||
// wxMDIChildFrame due to the tabbed implementation.
|
||||
virtual bool IsMaximized(void) const ;
|
||||
|
@@ -77,6 +77,8 @@ public:
|
||||
virtual bool IsIconized() const;
|
||||
void Fit();
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const ;
|
||||
|
||||
|
@@ -135,6 +135,8 @@ public:
|
||||
// Compatibility
|
||||
bool Iconized() const { return IsIconized(); }
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
|
||||
virtual void Maximize(bool maximize);
|
||||
// virtual bool LoadAccelerators(const wxString& table);
|
||||
|
||||
|
@@ -142,6 +142,8 @@ public:
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual bool IsTopLevel() const { return FALSE; }
|
||||
|
||||
// MDI operations
|
||||
virtual void Maximize(bool maximize = TRUE);
|
||||
virtual void Restore();
|
||||
|
@@ -338,7 +338,7 @@ public:
|
||||
inline wxWindow *GetGrandParent() const;
|
||||
|
||||
// is this window a top level one?
|
||||
bool IsTopLevel() const;
|
||||
virtual bool IsTopLevel() const;
|
||||
|
||||
// it doesn't really change parent, use ReParent() instead
|
||||
void SetParent( wxWindowBase *parent ) { m_parent = (wxWindow *)parent; }
|
||||
|
@@ -56,7 +56,7 @@ bool MyApp::OnInit(void)
|
||||
m_canvasFont = *wxNORMAL_FONT;
|
||||
|
||||
// Create the main frame window
|
||||
MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxWindows dialogs example", wxPoint(50, 50), wxSize(400, 300));
|
||||
MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxWindows dialogs example", wxPoint(20, 20), wxSize(400, 300));
|
||||
|
||||
// Make a menubar
|
||||
wxMenu *file_menu = new wxMenu;
|
||||
|
@@ -427,7 +427,7 @@ bool wxWindowBase::Enable(bool enable)
|
||||
|
||||
bool wxWindowBase::IsTopLevel() const
|
||||
{
|
||||
return wxDynamicCast(this, wxFrame) || wxDynamicCast(this, wxDialog);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -118,13 +118,10 @@ gtk_dialog_realized_callback( GtkWidget *widget, wxDialog *win )
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
// FIXME I don't know when does it appear, but it's not in 1.2.2
|
||||
#if GTK_CHECK_VERSION(1, 2, 3)
|
||||
/* I haven't been able to set the position of
|
||||
the dialog before it is shown, so I set the
|
||||
position in "realize" */
|
||||
gtk_window_reposition( GTK_WINDOW(widget), win->m_x, win->m_y );
|
||||
#endif // GTK > 1.2.2
|
||||
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
|
||||
|
||||
/* all this is for Motif Window Manager "hints" and is supposed to be
|
||||
recognized by other WM as well. not tested. */
|
||||
@@ -171,7 +168,7 @@ gtk_dialog_realized_callback( GtkWidget *widget, wxDialog *win )
|
||||
gtk_window_set_policy(GTK_WINDOW(win->m_widget), 1, 1, 1);
|
||||
|
||||
/* set size hints */
|
||||
gint flag = GDK_HINT_POS;
|
||||
gint flag = 0; // GDK_HINT_POS;
|
||||
if ((win->GetMinWidth() != -1) || (win->GetMinHeight() != -1)) flag |= GDK_HINT_MIN_SIZE;
|
||||
if ((win->GetMaxWidth() != -1) || (win->GetMaxHeight() != -1)) flag |= GDK_HINT_MAX_SIZE;
|
||||
if (flag)
|
||||
@@ -494,18 +491,15 @@ void wxDialog::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth;
|
||||
if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
|
||||
|
||||
// FIXME I don't know when does it appear, but it's not in 1.2.2
|
||||
#if GTK_CHECK_VERSION(1, 2, 3)
|
||||
if ((m_x != -1) || (m_y != -1))
|
||||
{
|
||||
if ((m_x != old_x) || (m_y != old_y))
|
||||
{
|
||||
/* we set the position here and when showing the dialog
|
||||
for the first time in idle time */
|
||||
gtk_window_reposition( GTK_WINDOW(m_widget), m_x, m_y );
|
||||
gtk_widget_set_uposition( m_widget, m_x, m_y );
|
||||
}
|
||||
}
|
||||
#endif // GTK > 1.2.2
|
||||
|
||||
if ((m_width != old_width) || (m_height != old_height))
|
||||
{
|
||||
|
@@ -207,14 +207,10 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
// FIXME I don't know when does it appear, but it's not in 1.2.2
|
||||
#if GTK_CHECK_VERSION(1, 2, 3)
|
||||
/* I haven't been able to set the position of
|
||||
the dialog before it is shown, so I set the
|
||||
position in "realize" */
|
||||
wxLogDebug( "%d %d\n", win->m_x, win->m_y );
|
||||
gtk_window_reposition( GTK_WINDOW(widget), win->m_x, win->m_y );
|
||||
#endif // GTK > 1.2.2
|
||||
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
|
||||
|
||||
/* all this is for Motif Window Manager "hints" and is supposed to be
|
||||
recognized by other WM as well. not tested. */
|
||||
@@ -254,7 +250,7 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||
gtk_window_set_policy(GTK_WINDOW(win->m_widget), 1, 1, 1);
|
||||
|
||||
/* set size hints */
|
||||
gint flag = GDK_HINT_POS;
|
||||
gint flag = 0; // GDK_HINT_POS;
|
||||
if ((win->GetMinWidth() != -1) || (win->GetMinHeight() != -1)) flag |= GDK_HINT_MIN_SIZE;
|
||||
if ((win->GetMaxWidth() != -1) || (win->GetMaxHeight() != -1)) flag |= GDK_HINT_MAX_SIZE;
|
||||
if (flag)
|
||||
@@ -569,16 +565,13 @@ void wxFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth;
|
||||
if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
|
||||
|
||||
// FIXME I don't know when does it appear, but it's not in 1.2.2
|
||||
#if GTK_CHECK_VERSION(1, 2, 3)
|
||||
if ((m_x != -1) || (m_y != -1))
|
||||
{
|
||||
if ((m_x != old_x) || (m_y != old_y))
|
||||
{
|
||||
gtk_window_reposition( GTK_WINDOW(m_widget), m_x, m_y );
|
||||
gtk_widget_set_uposition( m_widget, m_x, m_y );
|
||||
}
|
||||
}
|
||||
#endif // GTK > 1.2.2
|
||||
|
||||
if ((m_width != old_width) || (m_height != old_height))
|
||||
{
|
||||
|
@@ -121,7 +121,7 @@ static void wxMenubarUnsetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
wxWindow *top_frame = win;
|
||||
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
|
||||
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
|
||||
top_frame = top_frame->GetParent();
|
||||
|
||||
/* support for native hot keys */
|
||||
@@ -144,7 +144,7 @@ static void wxMenubarSetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
wxWindow *top_frame = win;
|
||||
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
|
||||
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
|
||||
top_frame = top_frame->GetParent();
|
||||
|
||||
/* support for native hot keys */
|
||||
@@ -166,7 +166,7 @@ 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() && !(top_frame->GetParent()->m_isFrame))
|
||||
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
|
||||
top_frame = top_frame->GetParent();
|
||||
|
||||
/* support for native key accelerators indicated by underscroes */
|
||||
@@ -187,7 +187,7 @@ 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() && !(top_frame->GetParent()->m_isFrame))
|
||||
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
|
||||
top_frame = top_frame->GetParent();
|
||||
|
||||
/* support for native key accelerators indicated by underscroes */
|
||||
|
@@ -782,7 +782,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event )
|
||||
if ((key_event.KeyCode() == WXK_RETURN) && !(m_windowStyle & wxTE_MULTILINE))
|
||||
{
|
||||
wxWindow *top_frame = m_parent;
|
||||
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
|
||||
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
|
||||
top_frame = top_frame->GetParent();
|
||||
GtkWindow *window = GTK_WINDOW(top_frame->m_widget);
|
||||
|
||||
|
@@ -118,13 +118,10 @@ gtk_dialog_realized_callback( GtkWidget *widget, wxDialog *win )
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
// FIXME I don't know when does it appear, but it's not in 1.2.2
|
||||
#if GTK_CHECK_VERSION(1, 2, 3)
|
||||
/* I haven't been able to set the position of
|
||||
the dialog before it is shown, so I set the
|
||||
position in "realize" */
|
||||
gtk_window_reposition( GTK_WINDOW(widget), win->m_x, win->m_y );
|
||||
#endif // GTK > 1.2.2
|
||||
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
|
||||
|
||||
/* all this is for Motif Window Manager "hints" and is supposed to be
|
||||
recognized by other WM as well. not tested. */
|
||||
@@ -171,7 +168,7 @@ gtk_dialog_realized_callback( GtkWidget *widget, wxDialog *win )
|
||||
gtk_window_set_policy(GTK_WINDOW(win->m_widget), 1, 1, 1);
|
||||
|
||||
/* set size hints */
|
||||
gint flag = GDK_HINT_POS;
|
||||
gint flag = 0; // GDK_HINT_POS;
|
||||
if ((win->GetMinWidth() != -1) || (win->GetMinHeight() != -1)) flag |= GDK_HINT_MIN_SIZE;
|
||||
if ((win->GetMaxWidth() != -1) || (win->GetMaxHeight() != -1)) flag |= GDK_HINT_MAX_SIZE;
|
||||
if (flag)
|
||||
@@ -494,18 +491,15 @@ void wxDialog::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth;
|
||||
if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
|
||||
|
||||
// FIXME I don't know when does it appear, but it's not in 1.2.2
|
||||
#if GTK_CHECK_VERSION(1, 2, 3)
|
||||
if ((m_x != -1) || (m_y != -1))
|
||||
{
|
||||
if ((m_x != old_x) || (m_y != old_y))
|
||||
{
|
||||
/* we set the position here and when showing the dialog
|
||||
for the first time in idle time */
|
||||
gtk_window_reposition( GTK_WINDOW(m_widget), m_x, m_y );
|
||||
gtk_widget_set_uposition( m_widget, m_x, m_y );
|
||||
}
|
||||
}
|
||||
#endif // GTK > 1.2.2
|
||||
|
||||
if ((m_width != old_width) || (m_height != old_height))
|
||||
{
|
||||
|
@@ -207,14 +207,10 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
// FIXME I don't know when does it appear, but it's not in 1.2.2
|
||||
#if GTK_CHECK_VERSION(1, 2, 3)
|
||||
/* I haven't been able to set the position of
|
||||
the dialog before it is shown, so I set the
|
||||
position in "realize" */
|
||||
wxLogDebug( "%d %d\n", win->m_x, win->m_y );
|
||||
gtk_window_reposition( GTK_WINDOW(widget), win->m_x, win->m_y );
|
||||
#endif // GTK > 1.2.2
|
||||
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
|
||||
|
||||
/* all this is for Motif Window Manager "hints" and is supposed to be
|
||||
recognized by other WM as well. not tested. */
|
||||
@@ -254,7 +250,7 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||
gtk_window_set_policy(GTK_WINDOW(win->m_widget), 1, 1, 1);
|
||||
|
||||
/* set size hints */
|
||||
gint flag = GDK_HINT_POS;
|
||||
gint flag = 0; // GDK_HINT_POS;
|
||||
if ((win->GetMinWidth() != -1) || (win->GetMinHeight() != -1)) flag |= GDK_HINT_MIN_SIZE;
|
||||
if ((win->GetMaxWidth() != -1) || (win->GetMaxHeight() != -1)) flag |= GDK_HINT_MAX_SIZE;
|
||||
if (flag)
|
||||
@@ -569,16 +565,13 @@ void wxFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth;
|
||||
if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
|
||||
|
||||
// FIXME I don't know when does it appear, but it's not in 1.2.2
|
||||
#if GTK_CHECK_VERSION(1, 2, 3)
|
||||
if ((m_x != -1) || (m_y != -1))
|
||||
{
|
||||
if ((m_x != old_x) || (m_y != old_y))
|
||||
{
|
||||
gtk_window_reposition( GTK_WINDOW(m_widget), m_x, m_y );
|
||||
gtk_widget_set_uposition( m_widget, m_x, m_y );
|
||||
}
|
||||
}
|
||||
#endif // GTK > 1.2.2
|
||||
|
||||
if ((m_width != old_width) || (m_height != old_height))
|
||||
{
|
||||
|
@@ -121,7 +121,7 @@ static void wxMenubarUnsetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
wxWindow *top_frame = win;
|
||||
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
|
||||
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
|
||||
top_frame = top_frame->GetParent();
|
||||
|
||||
/* support for native hot keys */
|
||||
@@ -144,7 +144,7 @@ static void wxMenubarSetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
wxWindow *top_frame = win;
|
||||
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
|
||||
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
|
||||
top_frame = top_frame->GetParent();
|
||||
|
||||
/* support for native hot keys */
|
||||
@@ -166,7 +166,7 @@ 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() && !(top_frame->GetParent()->m_isFrame))
|
||||
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
|
||||
top_frame = top_frame->GetParent();
|
||||
|
||||
/* support for native key accelerators indicated by underscroes */
|
||||
@@ -187,7 +187,7 @@ 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() && !(top_frame->GetParent()->m_isFrame))
|
||||
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
|
||||
top_frame = top_frame->GetParent();
|
||||
|
||||
/* support for native key accelerators indicated by underscroes */
|
||||
|
@@ -782,7 +782,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event )
|
||||
if ((key_event.KeyCode() == WXK_RETURN) && !(m_windowStyle & wxTE_MULTILINE))
|
||||
{
|
||||
wxWindow *top_frame = m_parent;
|
||||
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
|
||||
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
|
||||
top_frame = top_frame->GetParent();
|
||||
GtkWindow *window = GTK_WINDOW(top_frame->m_widget);
|
||||
|
||||
|
Reference in New Issue
Block a user