dock window

This commit is contained in:
Vadim Lopatin 2015-01-15 17:51:09 +03:00
parent 35090c4416
commit 507f938fad
2 changed files with 40 additions and 4 deletions

View File

@ -223,6 +223,39 @@
padding="4,4,4,4" padding="4,4,4,4"
layoutWeight="0" layoutWeight="0"
/> />
<style id="DOCK_HOST"
backgroundColor="#303080"
layoutWidth="FILL_PARENT"
layoutHeight="FILL_PARENT"
padding="4,4,4,4"
margins="4,4,4,4"
/>
<style id="DOCK_WINDOW"
backgroundColor="#D0D0FF"
layoutWidth="FILL_PARENT"
layoutHeight="FILL_PARENT"
padding="1,1,1,1"
margins="4,4,4,4"
/>
<style id="DOCK_WINDOW_CAPTION"
backgroundColor="#202060"
layoutWidth="FILL_PARENT"
layoutHeight="WRAP_CONTENT"
padding="1,1,1,1"
/>
<style id="DOCK_WINDOW_CAPTION_LABEL"
textColor="#FFFFFF"
layoutWidth="FILL_PARENT"
layoutHeight="WRAP_CONTENT"
padding="2,2,2,2"
align="Left|VCenter"
/>
<style id="DOCK_WINDOW_BODY"
backgroundColor="#FFFFFF"
layoutWidth="FILL_PARENT"
layoutHeight="FILL_PARENT"
padding="1,1,1,1"
/>
<style id="TREE_ITEM" <style id="TREE_ITEM"
padding="2,2,2,2" padding="2,2,2,2"
margins="0,0,0,0" margins="0,0,0,0"

View File

@ -4,18 +4,21 @@ import dlangui.all;
import dlangide.workspace.workspace; import dlangide.workspace.workspace;
import dlangide.workspace.project; import dlangide.workspace.project;
class WorkspacePanel : VerticalLayout { class WorkspacePanel : DockWindow {
protected Workspace _workspace; protected Workspace _workspace;
protected TreeWidget _tree; protected TreeWidget _tree;
this(string id) { this(string id) {
super(id); super(id);
layoutHeight = FILL_PARENT; workspace = null;
layoutWidth = 200; layoutWidth = 200;
_caption.text = "Workspace Explorer"d;
}
override protected Widget createBodyWidget() {
_tree = new TreeWidget("wstree"); _tree = new TreeWidget("wstree");
_tree.layoutHeight = FILL_PARENT; _tree.layoutHeight = FILL_PARENT;
addChild(_tree); return _tree;
workspace = null;
} }
@property Workspace workspace() { @property Workspace workspace() {