Use a GtkVBox to do TLW layout. Rework some of the remaining sizing code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -10,17 +10,6 @@
|
||||
#ifndef _WX_GTK_FRAME_H_
|
||||
#define _WX_GTK_FRAME_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMenu;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMenuBar;
|
||||
class WXDLLIMPEXP_FWD_CORE wxToolBar;
|
||||
class WXDLLIMPEXP_FWD_CORE wxStatusBar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -68,13 +57,8 @@ public:
|
||||
// --------------------------
|
||||
|
||||
// GTK callbacks
|
||||
virtual void GtkOnSize();
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
bool m_menuBarDetached;
|
||||
int m_menuBarHeight;
|
||||
bool m_toolBarDetached;
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
@@ -85,13 +69,6 @@ protected:
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
virtual void DetachMenuBar();
|
||||
virtual void AttachMenuBar(wxMenuBar *menubar);
|
||||
// Whether frame has a menubar showing
|
||||
// (needed to deal with perverted MDI menubar handling)
|
||||
virtual bool HasVisibleMenubar() const;
|
||||
|
||||
public:
|
||||
// Menu size is dynamic now, call this whenever it might change.
|
||||
void UpdateMenuBarSize();
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
private:
|
||||
|
@@ -12,6 +12,9 @@
|
||||
|
||||
#include "wx/frame.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMDIParentFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -58,12 +61,11 @@ public:
|
||||
wxMDIClientWindow *m_clientWindow;
|
||||
bool m_justInserted;
|
||||
|
||||
virtual void GtkOnSize();
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
virtual bool HasVisibleMenubar() const;
|
||||
virtual void DoGetClientSize(int* width, int* height) const;
|
||||
|
||||
private:
|
||||
friend class wxMDIChildFrame;
|
||||
|
@@ -7,23 +7,12 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKMINIFRAMEH__
|
||||
#define __GTKMINIFRAMEH__
|
||||
#ifndef _WX_GTK_MINIFRAME_H_
|
||||
#define _WX_GTK_MINIFRAME_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_MINIFRAME
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/frame.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMiniFrame;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMiniFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -54,15 +43,18 @@ public:
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual void SetTitle( const wxString &title );
|
||||
|
||||
protected:
|
||||
virtual void DoGetClientSize(int* width, int* height) const;
|
||||
|
||||
// implementation
|
||||
|
||||
public:
|
||||
bool m_isDragging;
|
||||
int m_oldX,m_oldY;
|
||||
int m_diffX,m_diffY;
|
||||
wxBitmap m_closeButton;
|
||||
int m_miniEdge;
|
||||
int m_miniTitle;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// __GTKMINIFRAMEH__
|
||||
#endif // _WX_GTK_MINIFRAME_H_
|
||||
|
@@ -25,20 +25,15 @@ public:
|
||||
{ (void)Create(parent, flags); }
|
||||
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
|
||||
|
||||
virtual bool Show( bool show = TRUE );
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
// GTK time when connecting to button_press signal
|
||||
wxUint32 m_time;
|
||||
|
||||
|
||||
protected:
|
||||
void GtkOnSize();
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
@@ -46,9 +41,9 @@ protected:
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
|
||||
private:
|
||||
bool m_sizeSet;
|
||||
|
||||
#ifdef __WXUNIVERSAL__
|
||||
DECLARE_EVENT_TABLE()
|
||||
#endif
|
||||
DECLARE_DYNAMIC_CLASS(wxPopupWindow)
|
||||
};
|
||||
|
||||
|
@@ -83,14 +83,11 @@ public:
|
||||
// --------------------------
|
||||
|
||||
// GTK callbacks
|
||||
virtual void GtkOnSize();
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
// do *not* call this to iconize the frame, this is a private function!
|
||||
void SetIconizeState(bool iconic);
|
||||
|
||||
int m_miniEdge,
|
||||
m_miniTitle;
|
||||
GtkWidget *m_mainWidget;
|
||||
|
||||
bool m_fsIsShowing; /* full screen */
|
||||
@@ -101,8 +98,6 @@ public:
|
||||
int m_gdkFunc,
|
||||
m_gdkDecor;
|
||||
|
||||
bool m_sizeSet;
|
||||
|
||||
// private gtk_timeout_add result for mimicing wxUSER_ATTENTION_INFO and
|
||||
// wxUSER_ATTENTION_ERROR difference, -2 for no hint, -1 for ERROR hint, rest for GtkTimeout handle.
|
||||
int m_urgency_hint;
|
||||
@@ -116,8 +111,6 @@ public:
|
||||
// return the size of the window without WM decorations
|
||||
void GTKDoGetSize(int *width, int *height) const;
|
||||
|
||||
void GtkUpdateSize() { m_sizeSet = false; }
|
||||
|
||||
// whether frame extents are accurate
|
||||
virtual bool IsDecorCacheable() const;
|
||||
|
||||
@@ -139,6 +132,7 @@ protected:
|
||||
// string shown in the title bar
|
||||
wxString m_title;
|
||||
|
||||
private:
|
||||
// is the frame currently iconized?
|
||||
bool m_isIconized;
|
||||
|
||||
|
@@ -60,7 +60,7 @@ public:
|
||||
virtual bool IsRetained() const;
|
||||
|
||||
virtual void SetFocus();
|
||||
|
||||
|
||||
// hint from wx to native GTK+ tab traversal code
|
||||
virtual void SetCanFocus(bool canFocus);
|
||||
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
|
||||
// return true if the window is of a standard (i.e. not wxWidgets') class
|
||||
bool IsOfStandardClass() const { return m_wxwindow == NULL; }
|
||||
|
||||
|
||||
// this widget will be queried for GTK's focus events
|
||||
GtkWidget *m_focusWidget;
|
||||
|
||||
@@ -284,13 +284,11 @@ public:
|
||||
// find the direction of the given scrollbar (must be one of ours)
|
||||
ScrollDir ScrollDirFromRange(GtkRange *range) const;
|
||||
|
||||
|
||||
// extra (wxGTK-specific) flags
|
||||
bool m_noExpose:1; // wxGLCanvas has its own redrawing
|
||||
bool m_nativeSizeEvent:1; // wxGLCanvas sends wxSizeEvent upon "alloc_size"
|
||||
bool m_hasScrolling:1;
|
||||
bool m_hasVMT:1;
|
||||
bool m_resizing:1;
|
||||
bool m_hasFocus:1; // true if == FindFocus()
|
||||
bool m_isScrolling:1; // dragging scrollbar thumb?
|
||||
bool m_clipPaintRegion:1; // true after ScrollWindow()
|
||||
|
Reference in New Issue
Block a user