mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-31 22:02:58 -06:00
Docking & TabBar: namespace declaration changed
git-svn-id: svn://ultimatepp.org/upp/trunk@1345 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ea663abce2
commit
0dfde73755
21 changed files with 62 additions and 19 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include "Docking.h"
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
#define HIGHLIGHT_DURATION 1000
|
||||
|
||||
DockConfigDlg::DockConfigDlg(DockWindow& dockwindow)
|
||||
|
|
@ -350,3 +352,4 @@ String DockConfigDlg::PositionString(DockableCtrl *dc) const
|
|||
return t_("Hidden");
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#include "DockCont.h"
|
||||
#include "Docking.h"
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
// DockCont (Dockable Container)
|
||||
#if defined(PLATFORM_WIN32)
|
||||
LRESULT DockCont::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
|
@ -856,3 +858,4 @@ DockCont::DockCont()
|
|||
Lock(false);
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
#include <Docking/DockableCtrl.h>
|
||||
#include <Docking/DockTabBar.h>
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
class DockWindow;
|
||||
|
||||
struct ImgButton : public Pusher {
|
||||
|
|
@ -208,5 +210,6 @@ public:
|
|||
DockCont();
|
||||
};
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "Docking.h"
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
#define DOCKBACK(x) callback(dock, &DockWindow::x)
|
||||
#define DOCKBACK1(x, arg) callback1(dock, &DockWindow::x, arg)
|
||||
#define DOCKBACK2(m, a, b) callback2(dock, &DockWindow::m, a, b)
|
||||
|
|
@ -145,3 +147,5 @@ const char * DockMenu::AlignText(int align)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
#define _Docking_DockMenu_h_
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
using namespace Upp;
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
class DockWindow;
|
||||
class DockableCtrl;
|
||||
|
|
@ -46,4 +47,6 @@ protected:
|
|||
const char *AlignText(int align);
|
||||
};
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "DockPane.h"
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
int DockPane::ClientToPos(const Size& p)
|
||||
{
|
||||
int w = (width>>1)*pos.GetCount()-1;
|
||||
|
|
@ -411,3 +413,4 @@ DockPane::DockPane()
|
|||
pos.Clear();
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
#define _Docking_DockPane_h_
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
using namespace Upp;
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
class DockPane : public Splitter
|
||||
{
|
||||
|
|
@ -72,4 +73,6 @@ public:
|
|||
DockPane();
|
||||
};
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#include "DockTabBar.h"
|
||||
|
||||
#include "DockCont.h"
|
||||
|
||||
#define ANIM_SPEED 10
|
||||
#define ANIM_FRAMES 10
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
// DockTabBar
|
||||
int AutoHideBar::autohide_timeout = 1000;
|
||||
|
||||
|
|
@ -307,3 +309,4 @@ void AutoHideBar::HidePopup::ChildMouseEvent(Ctrl *child, int event, Point p, in
|
|||
WhenEnter();
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
#define _Docking_DockTabBar_h_
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
using namespace Upp;
|
||||
|
||||
#include <TabBar/TabBar.h>
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
class DockTabBar : public TabBar {
|
||||
public:
|
||||
typedef DockTabBar CLASSNAME;
|
||||
|
|
@ -87,4 +87,6 @@ private:
|
|||
void AdjustSize(Rect& r, const Size& sz);
|
||||
};
|
||||
|
||||
#endif
|
||||
END_UPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
#include "Docking.h"
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
#define ALIGN_ASSERT(al) ASSERT(al >= 0 && al < 4)
|
||||
#define FRAME_MOVE_DIV 5 // Outside fraction of the highlight that the mouse must be in to trigger dockpane reordering
|
||||
#define VERSION 5 // Serialisation version
|
||||
|
|
@ -1663,4 +1665,4 @@ CH_STYLE(PopUpDockWindow, Style, StyleDefault)
|
|||
outersize = 25;
|
||||
}
|
||||
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
#include "DockableCtrl.h"
|
||||
#include <Docking/DockCont.h>
|
||||
|
||||
#define IMAGECLASS DockingImg
|
||||
#define IMAGEFILE <Docking/Docking.iml>
|
||||
#include <Draw/iml_source.h>
|
||||
|
||||
#include <Docking/DockCont.h>
|
||||
NAMESPACE_UPP
|
||||
|
||||
DockCont * DockableCtrl::GetContainer() const
|
||||
{
|
||||
|
|
@ -166,3 +167,4 @@ CH_STYLE(DockableCtrl, Style, StyleDefaultVert)
|
|||
handle_vert = true;
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@
|
|||
#define _Docking_DockableCtrl_h_
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
using namespace Upp;
|
||||
|
||||
#define IMAGECLASS DockingImg
|
||||
#define IMAGEFILE <Docking/Docking.iml>
|
||||
#include <Draw/iml_header.h>
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
class DockCont;
|
||||
|
||||
class DockableCtrl : public ParentCtrl {
|
||||
|
|
@ -98,4 +99,6 @@ struct DockableParent : public DockableCtrl
|
|||
virtual void Paint(Draw& w) { w.DrawRect(GetSize(), SColorFace); }
|
||||
};
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@
|
|||
#define _Docking_Docking_h_
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
using namespace Upp;
|
||||
|
||||
#include <Docking/DockableCtrl.h>
|
||||
#include <Docking/DockCont.h>
|
||||
#include <Docking/DockPane.h>
|
||||
#include <Docking/DockMenu.h>
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
class DockWindow : public TopWindow {
|
||||
public:
|
||||
typedef DockWindow CLASSNAME;
|
||||
|
|
@ -396,6 +397,6 @@ T& DockWindow::CreateDockable(WString title)
|
|||
return q;
|
||||
}
|
||||
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ file
|
|||
DockPane.h,
|
||||
DockPane.cpp,
|
||||
DockTabBar.h,
|
||||
Docking.iml,
|
||||
DockTabBar.cpp,
|
||||
Docking.iml,
|
||||
Docking.lay,
|
||||
src.tpp,
|
||||
Docking.t;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include <Docking/Docking.h>
|
||||
|
||||
using namespace Upp;
|
||||
/*
|
||||
** This is very simple example designed to show the basics of setting up a
|
||||
** docking window without many of the compicated features
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include <Docking/Docking.h>
|
||||
|
||||
using namespace Upp;
|
||||
/*
|
||||
** This is an advanced example designed to show most of the available Docking features, and how
|
||||
** might be used in a real world application.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "TabBar.h"
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
String FileTabs::GetFileGroup(const String &file)
|
||||
{
|
||||
return GetFileDirectory(file);
|
||||
|
|
@ -179,3 +181,4 @@ extcolor(LtBlue)
|
|||
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
#include "TabBar.h"
|
||||
|
||||
class FileTabs : public TabBar
|
||||
{
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#define IMAGEFILE <TabBar/TabBar.iml>
|
||||
#include <Draw/iml_source.h>
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
// AlignedFrame
|
||||
void AlignedFrame::FrameLayout(Rect &r)
|
||||
{
|
||||
|
|
@ -1852,4 +1854,6 @@ TabBar& TabBar::CopySettings(const TabBar &src)
|
|||
Refresh();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
|
@ -2,12 +2,13 @@
|
|||
#define _TabBar_TabBar_h_
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
using namespace Upp;
|
||||
|
||||
#define IMAGECLASS TabBarImg
|
||||
#define IMAGEFILE <TabBar/TabBar.iml>
|
||||
#include <Draw/iml_header.h>
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
//#define TABBAR_DEBUG
|
||||
|
||||
struct AlignedFrame : FrameCtrl<Ctrl>
|
||||
|
|
@ -384,4 +385,6 @@ public:
|
|||
|
||||
#include "FileTabs.h"
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ uses
|
|||
CtrlLib;
|
||||
|
||||
file
|
||||
TabBar.cpp,
|
||||
TabBar.h,
|
||||
TabBar.cpp,
|
||||
FileTabs.h,
|
||||
FileTabs.cpp,
|
||||
TabBar.iml;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue