added wxTB_HORZ_TEXT (patch 713813); documented it; moved toolbar styles to toolbar.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -62,6 +62,8 @@
|
||||
# pragma warning(disable:4699) // using precompiled header
|
||||
# pragma warning(disable:4134) // conversion between pointers to members of same class
|
||||
# pragma warning(disable:4710) // function not inlined
|
||||
# pragma warning(disable:4284) //
|
||||
# pragma warning(disable:4097) //
|
||||
#ifndef WIN32
|
||||
# pragma warning(disable:4135) // conversion between different integral types
|
||||
# pragma warning(disable:4769) // assignment of near pointer to long integer
|
||||
@@ -1254,17 +1256,6 @@ enum wxBorder
|
||||
#define wxTC_MULTILINE wxNB_MULTILINE
|
||||
#define wxTC_OWNERDRAW 0x0200
|
||||
|
||||
// wxToolBar style flags
|
||||
#define wxTB_HORIZONTAL wxHORIZONTAL // == 0x0004
|
||||
#define wxTB_VERTICAL wxVERTICAL // == 0x0008
|
||||
#define wxTB_3DBUTTONS 0x0010
|
||||
#define wxTB_FLAT 0x0020 // supported only under Win98+/GTK
|
||||
#define wxTB_DOCKABLE 0x0040 // use native docking under GTK
|
||||
#define wxTB_NOICONS 0x0080 // don't show the icons
|
||||
#define wxTB_TEXT 0x0100 // show the text
|
||||
#define wxTB_NODIVIDER 0x0200 // don't show the divider (Windows)
|
||||
#define wxTB_NOALIGN 0x0400 // no automatic alignment (Windows)
|
||||
|
||||
/*
|
||||
* wxStatusBar95 flags
|
||||
*/
|
||||
|
@@ -122,9 +122,10 @@ public:
|
||||
|
||||
// toolbar functions
|
||||
// -----------------
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
// create main toolbar bycalling OnCreateToolBar()
|
||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL,
|
||||
virtual wxToolBar* CreateToolBar(long style = -1,
|
||||
wxWindowID winid = -1,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
// return a new toolbar
|
||||
|
@@ -68,7 +68,7 @@ public:
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT,
|
||||
virtual wxToolBar* CreateToolBar(long style = -1,
|
||||
wxWindowID id = -1,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
void SetToolBar(wxToolBar *toolbar);
|
||||
|
@@ -68,7 +68,7 @@ public:
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT,
|
||||
virtual wxToolBar* CreateToolBar(long style = -1,
|
||||
wxWindowID id = -1,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
void SetToolBar(wxToolBar *toolbar);
|
||||
|
@@ -72,7 +72,7 @@ public:
|
||||
|
||||
// Toolbar
|
||||
#if wxUSE_TOOLBAR
|
||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT,
|
||||
virtual wxToolBar* CreateToolBar(long style = -1,
|
||||
wxWindowID id = -1,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
|
||||
|
@@ -29,10 +29,10 @@ public:
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
@@ -40,17 +40,17 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
|
||||
virtual ~wxFrame();
|
||||
|
||||
virtual bool Show(bool show = TRUE);
|
||||
|
||||
// Set menu bar
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
|
||||
|
||||
// Set title
|
||||
void SetTitle(const wxString& title);
|
||||
|
||||
|
||||
// Set icon
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
virtual void SetIcons(const wxIconBundle& icons);
|
||||
@@ -58,22 +58,22 @@ public:
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual void PositionStatusBar();
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
|
||||
// Create toolbar
|
||||
#if wxUSE_TOOLBAR
|
||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL,
|
||||
virtual wxToolBar* CreateToolBar(long style = -1,
|
||||
wxWindowID id = -1,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
virtual void SetToolBar(wxToolBar *toolbar);
|
||||
virtual void PositionToolBar();
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
|
||||
// Implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
|
||||
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
@@ -82,9 +82,9 @@ public:
|
||||
WXWidget GetWorkAreaWidget() const { return m_workArea; }
|
||||
WXWidget GetClientAreaWidget() const { return m_clientArea; }
|
||||
WXWidget GetTopWidget() const { return m_frameShell; }
|
||||
|
||||
|
||||
virtual WXWidget GetMainWidget() const { return m_mainWidget; }
|
||||
|
||||
|
||||
// The widget that can have children on it
|
||||
WXWidget GetClientWidget() const;
|
||||
bool GetVisibleStatus() const { return m_visibleStatus; }
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
void SendSizeEvent();
|
||||
|
||||
// for generic/mdig.h
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
@@ -109,14 +109,14 @@ private:
|
||||
WXWidget m_clientArea;
|
||||
bool m_visibleStatus;
|
||||
bool m_iconized;
|
||||
|
||||
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
virtual void DoGetPosition(int *x, int *y) const;
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
|
||||
|
||||
private:
|
||||
virtual bool DoCreate( wxWindow* parent, wxWindowID id,
|
||||
const wxString& title,
|
||||
|
@@ -56,7 +56,7 @@ public:
|
||||
|
||||
// Toolbar
|
||||
#if wxUSE_TOOLBAR
|
||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT,
|
||||
virtual wxToolBar* CreateToolBar(long style = -1,
|
||||
wxWindowID id = -1,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
|
||||
|
@@ -66,7 +66,7 @@ public:
|
||||
|
||||
// Toolbar
|
||||
#if wxUSE_TOOLBAR
|
||||
virtual wxToolBar* CreateToolBar( long lStyle = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT
|
||||
virtual wxToolBar* CreateToolBar( long lStyle = -1
|
||||
,wxWindowID vId = -1
|
||||
,const wxString& rsName = wxToolBarNameStr
|
||||
);
|
||||
|
@@ -12,9 +12,49 @@
|
||||
#ifndef _WX_TOOLBAR_H_BASE_
|
||||
#define _WX_TOOLBAR_H_BASE_
|
||||
|
||||
#include "wx/tbarbase.h" // the base class for all toolbars
|
||||
#include "wx/defs.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxToolBar style flags
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
enum
|
||||
{
|
||||
// lay out the toolbar horizontally
|
||||
wxTB_HORIZONTAL = wxHORIZONTAL, // == 0x0004
|
||||
|
||||
// lay out the toolbar vertically
|
||||
wxTB_VERTICAL = wxVERTICAL, // == 0x0008
|
||||
|
||||
// show 3D buttons (wxToolBarSimple only)
|
||||
wxTB_3DBUTTONS = 0x0010,
|
||||
|
||||
// "flat" buttons (Win32/GTK only)
|
||||
wxTB_FLAT = 0x0020,
|
||||
|
||||
// dockable toolbar (GTK only)
|
||||
wxTB_DOCKABLE = 0x0040,
|
||||
|
||||
// don't show the icons (they're shown by default)
|
||||
wxTB_NOICONS = 0x0080,
|
||||
|
||||
// show the text (not shown by default)
|
||||
wxTB_TEXT = 0x0100,
|
||||
|
||||
// don't show the divider between toolbar and the window (Win32 only)
|
||||
wxTB_NODIVIDER = 0x0200,
|
||||
|
||||
// no automatic alignment (Win32 only, useless)
|
||||
wxTB_NOALIGN = 0x0400,
|
||||
|
||||
// show the text and the icons alongside, not vertically stacked (Win32/GTK)
|
||||
wxTB_HORZ_LAYOUT = 0x0800,
|
||||
wxTB_HORZ_TEXT = wxTB_HORZ_LAYOUT | wxTB_TEXT
|
||||
};
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
#include "wx/tbarbase.h" // the base class for all toolbars
|
||||
|
||||
#if !wxUSE_TOOLBAR_NATIVE && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/tbarsmpl.h"
|
||||
|
||||
|
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
// create main toolbar bycalling OnCreateToolBar()
|
||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL,
|
||||
virtual wxToolBar* CreateToolBar(long style = -1,
|
||||
wxWindowID id = -1,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
virtual void PositionToolBar();
|
||||
|
Reference in New Issue
Block a user