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
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -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
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -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)
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -1,10 +1,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: framemanager.cpp
|
||||
// Name: src/aui/framemanager.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,20 +30,19 @@
|
||||
#include "wx/aui/floatpane.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
// #include "wx/log.h"
|
||||
#include "wx/settings.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/dcscreen.h"
|
||||
#endif
|
||||
|
||||
//#include "wx/dcbuffer.h"
|
||||
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/dcscreen.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/image.h"
|
||||
#include "wx/settings.h"
|
||||
#include "wx/toolbar.h"
|
||||
|
||||
#if wxUSE_MDI
|
||||
#include "wx/mdi.h"
|
||||
#include "wx/mdi.h"
|
||||
#endif
|
||||
|
||||
WX_CHECK_BUILD_OPTIONS("wxAUI")
|
||||
@@ -117,7 +116,7 @@ static void MakeWindowTransparent(wxWindow* wnd, int amount)
|
||||
if (0 == (exstyle & 0x80000) /*WS_EX_LAYERED*/)
|
||||
SetWindowLong(hwnd, GWL_EXSTYLE, exstyle | 0x80000 /*WS_EX_LAYERED*/);
|
||||
|
||||
pSetLayeredWindowAttributes(hwnd, 0, amount, 2 /*LWA_ALPHA*/);
|
||||
pSetLayeredWindowAttributes(hwnd, 0, (BYTE)amount, 2 /*LWA_ALPHA*/);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -576,7 +575,7 @@ bool wxFrameManager::AddPane(wxWindow* window, const wxPaneInfo& pane_info)
|
||||
pinfo.window = window;
|
||||
|
||||
// if the pane's name identifier is blank, create a random string
|
||||
if (pinfo.name.IsEmpty())
|
||||
if (pinfo.name.empty())
|
||||
{
|
||||
pinfo.name.Printf(wxT("%08x%08x%08x%08x"),
|
||||
((unsigned long)pinfo.window) & 0xffffffff,
|
||||
@@ -738,7 +737,7 @@ bool wxFrameManager::DetachPane(wxWindow* window)
|
||||
static wxString EscapeDelimiters(const wxString& s)
|
||||
{
|
||||
wxString result;
|
||||
result.Alloc(s.Length());
|
||||
result.Alloc(s.length());
|
||||
const wxChar* ch = s.c_str();
|
||||
while (*ch)
|
||||
{
|
||||
@@ -846,7 +845,7 @@ bool wxFrameManager::LoadPerspective(const wxString& layout, bool update)
|
||||
pane_part.Trim(true);
|
||||
|
||||
// if the string is empty, we're done parsing
|
||||
if (pane_part.IsEmpty())
|
||||
if (pane_part.empty())
|
||||
break;
|
||||
|
||||
|
||||
@@ -885,7 +884,7 @@ bool wxFrameManager::LoadPerspective(const wxString& layout, bool update)
|
||||
value.Trim(true);
|
||||
value.Trim(false);
|
||||
|
||||
if (val_name.IsEmpty())
|
||||
if (val_name.empty())
|
||||
break;
|
||||
|
||||
if (val_name == wxT("name"))
|
||||
@@ -1778,11 +1777,11 @@ void wxFrameManager::Update()
|
||||
// on MSW, if the owner desires transparent dragging, and
|
||||
// the dragging is happening right now, then the floating
|
||||
// window should have this style by default
|
||||
#ifdef __WXMSW__
|
||||
#ifdef __WXMSW__
|
||||
if (m_action == actionDragFloatingPane &&
|
||||
(m_flags & wxAUI_MGR_TRANSPARENT_DRAG))
|
||||
MakeWindowTransparent(frame, 150);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
frame->SetPaneWindow(p);
|
||||
p.frame = frame;
|
||||
@@ -2416,7 +2415,7 @@ void wxFrameManager::OnHintFadeTimer(wxTimerEvent& WXUNUSED(event))
|
||||
|
||||
void wxFrameManager::ShowHint(const wxRect& rect)
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
#ifdef __WXMSW__
|
||||
|
||||
// First, determine if the operating system can handle transparency.
|
||||
// Transparency is available on Win2000 and above
|
||||
@@ -2479,7 +2478,7 @@ void wxFrameManager::ShowHint(const wxRect& rect)
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (m_last_hint != rect)
|
||||
{
|
||||
@@ -2529,7 +2528,7 @@ void wxFrameManager::ShowHint(const wxRect& rect)
|
||||
void wxFrameManager::HideHint()
|
||||
{
|
||||
// hides a transparent window hint (currently wxMSW only)
|
||||
#ifdef __WXMSW__
|
||||
#ifdef __WXMSW__
|
||||
if (m_hint_wnd)
|
||||
{
|
||||
MakeWindowTransparent(m_hint_wnd, 0);
|
||||
@@ -2537,7 +2536,7 @@ void wxFrameManager::HideHint()
|
||||
m_last_hint = wxRect();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// hides a painted hint by redrawing the frame window
|
||||
if (!m_last_hint.IsEmpty())
|
||||
@@ -2638,10 +2637,10 @@ void wxFrameManager::OnFloatingPaneMoveStart(wxWindow* wnd)
|
||||
wxPaneInfo& pane = GetPane(wnd);
|
||||
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#ifdef __WXMSW__
|
||||
if (m_flags & wxAUI_MGR_TRANSPARENT_DRAG)
|
||||
MakeWindowTransparent(pane.frame, 150);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxFrameManager::OnFloatingPaneMoving(wxWindow* wnd)
|
||||
@@ -2698,12 +2697,12 @@ void wxFrameManager::OnFloatingPaneMoving(wxWindow* wnd)
|
||||
|
||||
DrawHintRect(wnd, client_pt, action_offset);
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#ifdef __WXGTK__
|
||||
// this cleans up some screen artifacts that are caused on GTK because
|
||||
// we aren't getting the exact size of the window (see comment
|
||||
// in DrawHintRect)
|
||||
//Refresh();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// reduces flicker
|
||||
|
Reference in New Issue
Block a user