mirror of https://github.com/buggins/dlangide.git
use DockHost, DockFrame
This commit is contained in:
parent
507f938fad
commit
fcdcf2a1fb
|
@ -224,21 +224,26 @@
|
||||||
layoutWeight="0"
|
layoutWeight="0"
|
||||||
/>
|
/>
|
||||||
<style id="DOCK_HOST"
|
<style id="DOCK_HOST"
|
||||||
backgroundColor="#303080"
|
backgroundColor="#293955"
|
||||||
layoutWidth="FILL_PARENT"
|
layoutWidth="FILL_PARENT"
|
||||||
layoutHeight="FILL_PARENT"
|
layoutHeight="FILL_PARENT"
|
||||||
padding="4,4,4,4"
|
padding="2,2,2,2"
|
||||||
|
/>
|
||||||
|
<style id="DOCK_HOST_BODY"
|
||||||
|
layoutWidth="FILL_PARENT"
|
||||||
|
layoutHeight="FILL_PARENT"
|
||||||
|
padding="1,1,1,1"
|
||||||
margins="4,4,4,4"
|
margins="4,4,4,4"
|
||||||
/>
|
/>
|
||||||
<style id="DOCK_WINDOW"
|
<style id="DOCK_WINDOW"
|
||||||
backgroundColor="#D0D0FF"
|
backgroundColor="#8E9BBC"
|
||||||
layoutWidth="FILL_PARENT"
|
layoutWidth="FILL_PARENT"
|
||||||
layoutHeight="FILL_PARENT"
|
layoutHeight="FILL_PARENT"
|
||||||
padding="1,1,1,1"
|
padding="1,1,1,1"
|
||||||
margins="4,4,4,4"
|
margins="4,4,4,4"
|
||||||
/>
|
/>
|
||||||
<style id="DOCK_WINDOW_CAPTION"
|
<style id="DOCK_WINDOW_CAPTION"
|
||||||
backgroundColor="#202060"
|
backgroundColor="#4d6082"
|
||||||
layoutWidth="FILL_PARENT"
|
layoutWidth="FILL_PARENT"
|
||||||
layoutHeight="WRAP_CONTENT"
|
layoutHeight="WRAP_CONTENT"
|
||||||
padding="1,1,1,1"
|
padding="1,1,1,1"
|
||||||
|
@ -247,7 +252,7 @@
|
||||||
textColor="#FFFFFF"
|
textColor="#FFFFFF"
|
||||||
layoutWidth="FILL_PARENT"
|
layoutWidth="FILL_PARENT"
|
||||||
layoutHeight="WRAP_CONTENT"
|
layoutHeight="WRAP_CONTENT"
|
||||||
padding="2,2,2,2"
|
padding="3,3,3,3"
|
||||||
align="Left|VCenter"
|
align="Left|VCenter"
|
||||||
/>
|
/>
|
||||||
<style id="DOCK_WINDOW_BODY"
|
<style id="DOCK_WINDOW_BODY"
|
||||||
|
|
|
@ -6,6 +6,7 @@ import dlangui.widgets.layouts;
|
||||||
import dlangui.widgets.editors;
|
import dlangui.widgets.editors;
|
||||||
import dlangui.widgets.controls;
|
import dlangui.widgets.controls;
|
||||||
import dlangui.widgets.appframe;
|
import dlangui.widgets.appframe;
|
||||||
|
import dlangui.widgets.docks;
|
||||||
import dlangui.dialogs.dialog;
|
import dlangui.dialogs.dialog;
|
||||||
import dlangui.dialogs.filedlg;
|
import dlangui.dialogs.filedlg;
|
||||||
|
|
||||||
|
@ -28,6 +29,7 @@ class IDEFrame : AppFrame {
|
||||||
|
|
||||||
MenuItem mainMenuItems;
|
MenuItem mainMenuItems;
|
||||||
WorkspacePanel _wsPanel;
|
WorkspacePanel _wsPanel;
|
||||||
|
DockHost _dockHost;
|
||||||
|
|
||||||
this(Window window) {
|
this(Window window) {
|
||||||
super();
|
super();
|
||||||
|
@ -40,14 +42,14 @@ class IDEFrame : AppFrame {
|
||||||
|
|
||||||
/// create app body widget
|
/// create app body widget
|
||||||
override protected Widget createBody() {
|
override protected Widget createBody() {
|
||||||
|
_dockHost = new DockHost();
|
||||||
|
|
||||||
|
//=============================================================
|
||||||
|
// Create body - Tabs
|
||||||
|
|
||||||
// editor tabs
|
// editor tabs
|
||||||
TabWidget tabs = new TabWidget("TABS");
|
TabWidget tabs = new TabWidget("TABS");
|
||||||
tabs.layoutWidth = FILL_PARENT;
|
tabs.styleId = STYLE_DOCK_HOST_BODY;
|
||||||
tabs.layoutHeight = FILL_PARENT;
|
|
||||||
|
|
||||||
_wsPanel = new WorkspacePanel("workspace");
|
|
||||||
HorizontalLayout wsLayout = new HorizontalLayout();
|
|
||||||
wsLayout.layoutWidth(FILL_PARENT).layoutHeight(FILL_PARENT);
|
|
||||||
|
|
||||||
// create Editors test tab
|
// create Editors test tab
|
||||||
VerticalLayout editors = new VerticalLayout("editors");
|
VerticalLayout editors = new VerticalLayout("editors");
|
||||||
|
@ -59,12 +61,17 @@ class IDEFrame : AppFrame {
|
||||||
editors.addChild(editBox);
|
editors.addChild(editBox);
|
||||||
//editBox.popupMenu = editPopupItem;
|
//editBox.popupMenu = editPopupItem;
|
||||||
tabs.addTab(editors, "Sample"d);
|
tabs.addTab(editors, "Sample"d);
|
||||||
|
|
||||||
wsLayout.addChild(tabs);
|
|
||||||
wsLayout.addChild(new ResizerWidget("wsresizer"));
|
|
||||||
wsLayout.addChild(_wsPanel);
|
|
||||||
tabs.selectTab("editors");
|
tabs.selectTab("editors");
|
||||||
return wsLayout;
|
|
||||||
|
|
||||||
|
_dockHost.bodyWidget = tabs;
|
||||||
|
|
||||||
|
//=============================================================
|
||||||
|
// Create workspace docked panel
|
||||||
|
_wsPanel = new WorkspacePanel("workspace");
|
||||||
|
_dockHost.addDockedWindow(_wsPanel);
|
||||||
|
|
||||||
|
return _dockHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// create main menu
|
/// create main menu
|
||||||
|
|
Loading…
Reference in New Issue