Source cleaning, wxW headers, whitespaces and improved PCH support.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: aui.h
|
||||
// Name: wx/aui/aui.h
|
||||
// Purpose: wxaui: wx advanced user interface - docking window manager
|
||||
// Author: Benjamin I. Williams
|
||||
// Modified by:
|
||||
// Created: 2005-05-17
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
|
||||
// Licence: wxWindows Library Licence, Version 3.1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -1,10 +1,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dockart.h
|
||||
// Name: wx/aui/dockart.h
|
||||
// Purpose: wxaui: wx advanced user interface - docking window manager
|
||||
// Author: Benjamin I. Williams
|
||||
// Modified by:
|
||||
// Created: 2005-05-17
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
|
||||
// Licence: wxWindows Library Licence, Version 3.1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
virtual void SetColour(int id, const wxColor& colour) = 0;
|
||||
wxColor GetColor(int id) { return GetColour(id); }
|
||||
void SetColor(int id, const wxColor& color) { SetColour(id, color); }
|
||||
|
||||
|
||||
virtual void DrawSash(wxDC& dc,
|
||||
int orientation,
|
||||
const wxRect& rect) = 0;
|
||||
|
@@ -1,10 +1,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: floatpane.h
|
||||
// Name: wx/aui/floatpane.h
|
||||
// Purpose: wxaui: wx advanced user interface - docking window manager
|
||||
// Author: Benjamin I. Williams
|
||||
// Modified by:
|
||||
// Created: 2005-05-17
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
|
||||
// Licence: wxWindows Library Licence, Version 3.1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -34,7 +34,7 @@ class WXDLLIMPEXP_AUI wxFloatingPane : public wxFloatingPaneBaseClass
|
||||
public:
|
||||
wxFloatingPane(wxWindow* parent,
|
||||
wxFrameManager* owner_mgr,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize);
|
||||
~wxFloatingPane();
|
||||
|
@@ -1,10 +1,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: framemanager.h
|
||||
// Name: wx/aui/framemanager.h
|
||||
// Purpose: wxaui: wx advanced user interface - docking window manager
|
||||
// Author: Benjamin I. Williams
|
||||
// Modified by:
|
||||
// Created: 2005-05-17
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
|
||||
// Licence: wxWindows Library Licence, Version 3.1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
min_size = wxDefaultSize;
|
||||
max_size = wxDefaultSize;
|
||||
dock_proportion = 0;
|
||||
|
||||
|
||||
DefaultPane();
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
bool HasMinimizeButton() const { return HasFlag(buttonMinimize); }
|
||||
bool HasPinButton() const { return HasFlag(buttonPin); }
|
||||
bool HasGripperTop() const { return HasFlag(optionGripperTop); }
|
||||
|
||||
|
||||
wxPaneInfo& Window(wxWindow* w) { window = w; return *this; }
|
||||
wxPaneInfo& Name(const wxString& n) { name = n; return *this; }
|
||||
wxPaneInfo& Caption(const wxString& c) { caption = c; return *this; }
|
||||
@@ -236,7 +236,7 @@ public:
|
||||
wxPaneInfo& PaneBorder(bool visible = true) { return SetFlag(optionPaneBorder, visible); }
|
||||
wxPaneInfo& Gripper(bool visible = true) { return SetFlag(optionGripper, visible); }
|
||||
wxPaneInfo& GripperTop(bool attop = true) { return SetFlag(optionGripperTop, attop); }
|
||||
wxPaneInfo& CloseButton(bool visible = true) { return SetFlag(buttonClose, visible); }
|
||||
wxPaneInfo& CloseButton(bool visible = true) { return SetFlag(buttonClose, visible); }
|
||||
wxPaneInfo& MaximizeButton(bool visible = true) { return SetFlag(buttonMaximize, visible); }
|
||||
wxPaneInfo& MinimizeButton(bool visible = true) { return SetFlag(buttonMinimize, visible); }
|
||||
wxPaneInfo& PinButton(bool visible = true) { return SetFlag(buttonPin, visible); }
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
wxPaneInfo& TopDockable(bool b = true) { return SetFlag(optionTopDockable, b); }
|
||||
wxPaneInfo& BottomDockable(bool b = true) { return SetFlag(optionBottomDockable, b); }
|
||||
wxPaneInfo& LeftDockable(bool b = true) { return SetFlag(optionLeftDockable, b); }
|
||||
wxPaneInfo& RightDockable(bool b = true) { return SetFlag(optionRightDockable, b); }
|
||||
wxPaneInfo& RightDockable(bool b = true) { return SetFlag(optionRightDockable, b); }
|
||||
wxPaneInfo& Floatable(bool b = true) { return SetFlag(optionFloatable, b); }
|
||||
wxPaneInfo& Movable(bool b = true) { return SetFlag(optionMovable, b); }
|
||||
wxPaneInfo& Dockable(bool b = true)
|
||||
@@ -260,14 +260,14 @@ public:
|
||||
optionCaption | optionPaneBorder | buttonClose;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
wxPaneInfo& CentrePane() { return CenterPane(); }
|
||||
wxPaneInfo& CenterPane()
|
||||
{
|
||||
state = 0;
|
||||
return Center().PaneBorder().Resizable();
|
||||
}
|
||||
|
||||
|
||||
wxPaneInfo& ToolbarPane()
|
||||
{
|
||||
DefaultPane();
|
||||
@@ -286,7 +286,7 @@ public:
|
||||
state &= ~flag;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
bool HasFlag(unsigned int flag) const
|
||||
{
|
||||
return (state & flag) ? true:false;
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
optionDestroyOnClose = 1 << 12,
|
||||
optionToolbar = 1 << 13,
|
||||
optionActive = 1 << 14,
|
||||
optionGripperTop = 1 << 15,
|
||||
optionGripperTop = 1 << 15,
|
||||
|
||||
buttonClose = 1 << 24,
|
||||
buttonMaximize = 1 << 25,
|
||||
@@ -363,13 +363,13 @@ public:
|
||||
unsigned int flags = wxAUI_MGR_DEFAULT);
|
||||
virtual ~wxFrameManager();
|
||||
void UnInit();
|
||||
|
||||
|
||||
void SetFlags(unsigned int flags);
|
||||
unsigned int GetFlags() const;
|
||||
|
||||
|
||||
void SetFrame(wxFrame* frame);
|
||||
wxFrame* GetFrame() const;
|
||||
|
||||
|
||||
void SetArtProvider(wxDockArt* art_provider);
|
||||
wxDockArt* GetArtProvider() const;
|
||||
|
||||
@@ -379,22 +379,22 @@ public:
|
||||
|
||||
bool AddPane(wxWindow* window,
|
||||
const wxPaneInfo& pane_info);
|
||||
|
||||
|
||||
bool AddPane(wxWindow* window,
|
||||
int direction = wxLEFT,
|
||||
const wxString& caption = wxEmptyString);
|
||||
|
||||
|
||||
bool InsertPane(wxWindow* window,
|
||||
const wxPaneInfo& pane_info,
|
||||
int insert_level = wxAUI_INSERT_PANE);
|
||||
|
||||
|
||||
bool DetachPane(wxWindow* window);
|
||||
|
||||
wxString SavePerspective();
|
||||
|
||||
|
||||
bool LoadPerspective(const wxString& perspective,
|
||||
bool update = true);
|
||||
|
||||
|
||||
void Update();
|
||||
|
||||
private:
|
||||
@@ -500,7 +500,7 @@ private:
|
||||
wxWindow* m_hint_wnd; // transparent hint window (for now, only msw)
|
||||
wxTimer m_hint_fadetimer; // transparent fade timer (for now, only msw)
|
||||
int m_hint_fadeamt; // transparent fade amount (for now, only msw)
|
||||
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
@@ -644,7 +644,7 @@ public:
|
||||
// spectrum of events will be implemented in the next incremental version
|
||||
|
||||
BEGIN_DECLARE_EVENT_TYPES()
|
||||
DECLARE_EVENT_TYPE(wxEVT_AUI_PANEBUTTON, 0)
|
||||
DECLARE_EVENT_TYPE(wxEVT_AUI_PANEBUTTON, 0)
|
||||
END_DECLARE_EVENT_TYPES()
|
||||
|
||||
typedef void (wxEvtHandler::*wxFrameManagerEventFunction)(wxFrameManagerEvent&);
|
||||
|
@@ -1,10 +1,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dockart.cpp
|
||||
// Name: src/aui/dockart.cpp
|
||||
// Purpose: wxaui: wx advanced user interface - docking window manager
|
||||
// Author: Benjamin I. Williams
|
||||
// Modified by:
|
||||
// Created: 2005-05-17
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (C) Copyright 2005-2006, Kirix Corporation, All Rights Reserved
|
||||
// Licence: wxWindows Library Licence, Version 3.1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -26,17 +26,12 @@
|
||||
#if wxUSE_AUI
|
||||
|
||||
#include "wx/image.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/settings.h"
|
||||
#include "wx/aui/framemanager.h"
|
||||
#include "wx/aui/dockart.h"
|
||||
|
||||
#ifdef __WXMAC__
|
||||
#include "wx/mac/private.h"
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
// #include "wx/log.h"
|
||||
#include "wx/settings.h"
|
||||
#include "wx/dcclient.h"
|
||||
#endif
|
||||
|
||||
// -- wxDefaultDockArt class implementation --
|
||||
@@ -54,9 +49,9 @@
|
||||
static wxColor StepColour(const wxColor& c, int percent)
|
||||
{
|
||||
int r = c.Red(), g = c.Green(), b = c.Blue();
|
||||
return wxColour(wxMin((r*percent)/100,255),
|
||||
wxMin((g*percent)/100,255),
|
||||
wxMin((b*percent)/100,255));
|
||||
return wxColour((unsigned char)wxMin((r*percent)/100,255),
|
||||
(unsigned char)wxMin((g*percent)/100,255),
|
||||
(unsigned char)wxMin((b*percent)/100,255));
|
||||
}
|
||||
|
||||
static wxColor LightContrastColour(const wxColour& c)
|
||||
@@ -106,7 +101,9 @@ static void DrawGradientRectangle(wxDC& dc,
|
||||
int g = start_color.Green() + ((i*gd*100)/high)/100;
|
||||
int b = start_color.Blue() + ((i*bd*100)/high)/100;
|
||||
|
||||
wxPen p(wxColor(r,g,b));
|
||||
wxPen p(wxColor((unsigned char)r,
|
||||
(unsigned char)g,
|
||||
(unsigned char)b));
|
||||
dc.SetPen(p);
|
||||
|
||||
if (direction == wxAUI_GRADIENT_VERTICAL)
|
||||
@@ -126,7 +123,7 @@ wxDefaultDockArt::wxDefaultDockArt()
|
||||
#else
|
||||
wxColor base_color = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
||||
#endif
|
||||
|
||||
|
||||
wxColor darker1_color = StepColour(base_color, 85);
|
||||
wxColor darker2_color = StepColour(base_color, 70);
|
||||
wxColor darker3_color = StepColour(base_color, 60);
|
||||
@@ -177,7 +174,7 @@ wxDefaultDockArt::wxDefaultDockArt()
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xfc,0xdf,0xfc,0xdf,0xfc,
|
||||
0xdf,0xfc,0xdf,0xfc,0xdf,0xfc,0x0f,0xf8,0x7f,0xff,0x7f,0xff,
|
||||
0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
|
||||
|
||||
#ifdef __WXMAC__
|
||||
m_inactive_close_bitmap = BitmapFromBits(close_bits, 16, 16, *wxWHITE);
|
||||
#else
|
||||
@@ -240,16 +237,16 @@ wxColour wxDefaultDockArt::GetColour(int id)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case wxAUI_ART_BACKGROUND_COLOUR: return m_background_brush.GetColour(); break;
|
||||
case wxAUI_ART_SASH_COLOUR: return m_sash_brush.GetColour(); break;
|
||||
case wxAUI_ART_INACTIVE_CAPTION_COLOUR: return m_inactive_caption_colour; break;
|
||||
case wxAUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR: return m_inactive_caption_gradient_colour; break;
|
||||
case wxAUI_ART_INACTIVE_CAPTION_TEXT_COLOUR: return m_inactive_caption_text_colour; break;
|
||||
case wxAUI_ART_ACTIVE_CAPTION_COLOUR: return m_active_caption_colour; break;
|
||||
case wxAUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR: return m_active_caption_gradient_colour; break;
|
||||
case wxAUI_ART_ACTIVE_CAPTION_TEXT_COLOUR: return m_active_caption_text_colour; break;
|
||||
case wxAUI_ART_BORDER_COLOUR: return m_border_pen.GetColour(); break;
|
||||
case wxAUI_ART_GRIPPER_COLOUR: return m_gripper_brush.GetColour(); break;
|
||||
case wxAUI_ART_BACKGROUND_COLOUR: return m_background_brush.GetColour();
|
||||
case wxAUI_ART_SASH_COLOUR: return m_sash_brush.GetColour();
|
||||
case wxAUI_ART_INACTIVE_CAPTION_COLOUR: return m_inactive_caption_colour;
|
||||
case wxAUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR: return m_inactive_caption_gradient_colour;
|
||||
case wxAUI_ART_INACTIVE_CAPTION_TEXT_COLOUR: return m_inactive_caption_text_colour;
|
||||
case wxAUI_ART_ACTIVE_CAPTION_COLOUR: return m_active_caption_colour;
|
||||
case wxAUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR: return m_active_caption_gradient_colour;
|
||||
case wxAUI_ART_ACTIVE_CAPTION_TEXT_COLOUR: return m_active_caption_text_colour;
|
||||
case wxAUI_ART_BORDER_COLOUR: return m_border_pen.GetColour();
|
||||
case wxAUI_ART_GRIPPER_COLOUR: return m_gripper_brush.GetColour();
|
||||
default: wxFAIL_MSG(wxT("Invalid Metric Ordinal")); break;
|
||||
}
|
||||
|
||||
@@ -305,13 +302,13 @@ void wxDefaultDockArt::DrawSash(wxDC& dc, int, const wxRect& rect)
|
||||
CGContextTranslateCTM( cgContext , 0 , bounds.bottom - bounds.top ) ;
|
||||
CGContextScaleCTM( cgContext , 1 , -1 ) ;
|
||||
#endif
|
||||
|
||||
|
||||
HIThemeSplitterDrawInfo drawInfo ;
|
||||
drawInfo.version = 0 ;
|
||||
drawInfo.state = kThemeStateActive ;
|
||||
drawInfo.adornment = kHIThemeSplitterAdornmentNone ;
|
||||
HIThemeDrawPaneSplitter( &splitterRect , &drawInfo , cgContext , kHIThemeOrientationNormal ) ;
|
||||
|
||||
HIThemeDrawPaneSplitter( &splitterRect , &drawInfo , cgContext , kHIThemeOrientationNormal ) ;
|
||||
|
||||
#if wxMAC_USE_CORE_GRAPHICS
|
||||
#else
|
||||
QDEndCGContext( (CGrafPtr) dc.m_macPort , &cgContext ) ;
|
||||
@@ -354,7 +351,7 @@ void wxDefaultDockArt::DrawBorder(wxDC& dc, const wxRect& _rect,
|
||||
dc.SetPen(*wxWHITE_PEN);
|
||||
dc.DrawLine(rect.x, rect.y, rect.x+rect.width, rect.y);
|
||||
dc.DrawLine(rect.x, rect.y, rect.x, rect.y+rect.height);
|
||||
dc.SetPen(m_border_pen);
|
||||
dc.SetPen(m_border_pen);
|
||||
dc.DrawLine(rect.x, rect.y+rect.height-1,
|
||||
rect.x+rect.width, rect.y+rect.height-1);
|
||||
dc.DrawLine(rect.x+rect.width-1, rect.y,
|
||||
|
@@ -1,10 +1,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: floatpane.cpp
|
||||
// Name: src/aui/floatpane.cpp
|
||||
// Purpose: wxaui: wx advanced user interface - docking window manager
|
||||
// Author: Benjamin I. Williams
|
||||
// Modified by:
|
||||
// Created: 2005-05-17
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (C) Copyright 2005-2006, Kirix Corporation, All Rights Reserved
|
||||
// Licence: wxWindows Library Licence, Version 3.1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -30,15 +30,14 @@
|
||||
#include "wx/aui/dockart.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
// #include "wx/log.h"
|
||||
#endif
|
||||
|
||||
wxFloatingPane::wxFloatingPane(wxWindow* parent,
|
||||
wxFrameManager* owner_mgr,
|
||||
wxWindowID id /*= -1*/,
|
||||
wxWindowID id /*= wxID_ANY*/,
|
||||
const wxPoint& pos /*= wxDefaultPosition*/,
|
||||
const wxSize& size /*= wxDefaultSize*/)
|
||||
: wxFloatingPaneBaseClass(parent, id, wxT(""), pos, size,
|
||||
: wxFloatingPaneBaseClass(parent, id, wxEmptyString, pos, size,
|
||||
wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
|
||||
wxCLOSE_BOX | wxFRAME_NO_TASKBAR |
|
||||
wxFRAME_FLOAT_ON_PARENT | wxCLIP_CHILDREN)
|
||||
@@ -59,15 +58,15 @@ void wxFloatingPane::SetPaneWindow(const wxPaneInfo& pane)
|
||||
{
|
||||
m_pane_window = pane.window;
|
||||
m_pane_window->Reparent(this);
|
||||
|
||||
|
||||
wxPaneInfo contained_pane = pane;
|
||||
contained_pane.Dock().Center().Show().
|
||||
CaptionVisible(false).
|
||||
PaneBorder(false).
|
||||
Layer(0).Row(0).Position(0);
|
||||
|
||||
|
||||
m_mgr.AddPane(m_pane_window, contained_pane);
|
||||
m_mgr.Update();
|
||||
m_mgr.Update();
|
||||
|
||||
if (pane.min_size.IsFullySpecified())
|
||||
{
|
||||
@@ -78,7 +77,7 @@ void wxFloatingPane::SetPaneWindow(const wxPaneInfo& pane)
|
||||
GetSizer()->SetSizeHints(this);
|
||||
SetSize(tmp);
|
||||
}
|
||||
|
||||
|
||||
SetTitle(pane.caption);
|
||||
|
||||
if (contained_pane.IsFixed())
|
||||
@@ -102,7 +101,7 @@ void wxFloatingPane::SetPaneWindow(const wxPaneInfo& pane)
|
||||
else
|
||||
size.x += m_owner_mgr->m_art->GetMetric(wxAUI_ART_GRIPPER_SIZE);
|
||||
}
|
||||
|
||||
|
||||
SetClientSize(size);
|
||||
}
|
||||
}
|
||||
@@ -137,7 +136,7 @@ void wxFloatingPane::OnMoveEvent(wxMoveEvent& event)
|
||||
}
|
||||
|
||||
m_last_rect = win_rect;
|
||||
|
||||
|
||||
if (!isMouseDown())
|
||||
return;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user