forked from coderespawn/dock-spawn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Passing reference of dock manager to all the dock containers
- Loading branch information
1 parent
6cee046
commit 4eaf73d
Showing
215 changed files
with
33,014 additions
and
32,975 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
# Dart Excludes # | ||
################# | ||
*~ | ||
*.js | ||
*.js_ | ||
.children | ||
.project | ||
.gitmodules | ||
*.map | ||
*.lock | ||
*.tmp | ||
packages/ | ||
out/ | ||
|
||
# Compiled source # | ||
################### | ||
*.com | ||
*.class | ||
*.exe | ||
*.dll | ||
*.o | ||
*.obj | ||
*.ncb | ||
*.so | ||
|
||
# Packages # | ||
############ | ||
# it's better to unpack these files and commit the raw source | ||
# git has its own built in compression methods | ||
*.7z | ||
*.dmg | ||
*.gz | ||
*.iso | ||
*.jar | ||
*.rar | ||
*.tar | ||
*.zip | ||
|
||
# Logs and databases # | ||
###################### | ||
*.log | ||
*.sql | ||
*.sqlite | ||
|
||
# OS generated files # | ||
###################### | ||
.DS_Store* | ||
ehthumbs.db | ||
Icon? | ||
Thumbs.db | ||
|
||
# Binary directories # | ||
###################### | ||
bin/ | ||
# Dart Excludes # | ||
################# | ||
*~ | ||
*.js | ||
*.js_ | ||
.children | ||
.project | ||
.gitmodules | ||
*.map | ||
*.lock | ||
*.tmp | ||
packages/ | ||
out/ | ||
|
||
# Compiled source # | ||
################### | ||
*.com | ||
*.class | ||
*.exe | ||
*.dll | ||
*.o | ||
*.obj | ||
*.ncb | ||
*.so | ||
|
||
# Packages # | ||
############ | ||
# it's better to unpack these files and commit the raw source | ||
# git has its own built in compression methods | ||
*.7z | ||
*.dmg | ||
*.gz | ||
*.iso | ||
*.jar | ||
*.rar | ||
*.tar | ||
*.zip | ||
|
||
# Logs and databases # | ||
###################### | ||
*.log | ||
*.sql | ||
*.sqlite | ||
|
||
# OS generated files # | ||
###################### | ||
.DS_Store* | ||
ehthumbs.db | ||
Icon? | ||
Thumbs.db | ||
|
||
# Binary directories # | ||
###################### | ||
bin/ | ||
obj/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Dock Spawn Authors | ||
|
||
Ali Akbar <[email protected]> | ||
# Dock Spawn Authors | ||
Ali Akbar <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
Copyright (c) 2012 CodeRespawn.com and other contributors | ||
|
||
Permission is hereby granted, free | ||
of charge, to any person obtaining a copy of this software and associated | ||
documentation files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, copy, modify, | ||
merge, publish, distribute, sublicense, and/or sell copies of the Software, and | ||
to permit persons to whom the Software is furnished to do so, subject to the | ||
following conditions: | ||
|
||
The above copyright notice and this permission notice | ||
shall be included in all copies or substantial portions of the Software. | ||
|
||
THE | ||
SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
Copyright (c) 2012 CodeRespawn.com and other contributors | ||
Permission is hereby granted, free | ||
of charge, to any person obtaining a copy of this software and associated | ||
documentation files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, copy, modify, | ||
merge, publish, distribute, sublicense, and/or sell copies of the Software, and | ||
to permit persons to whom the Software is furnished to do so, subject to the | ||
following conditions: | ||
The above copyright notice and this permission notice | ||
shall be included in all copies or substantial portions of the Software. | ||
THE | ||
SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dock_spawn.dart | ||
dock_spawn.dart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>DockManager</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.google.dart.tools.core.dartBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.google.dart.tools.core.dartNature</nature> | ||
</natures> | ||
</projectDescription> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>DockManager</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.google.dart.tools.core.dartBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.google.dart.tools.core.dartNature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
part of dock_spawn; | ||
|
||
/** | ||
* Any dockable entity needs to implement this inteface | ||
*/ | ||
abstract class IDockContainer { | ||
DockManager get dockManager; | ||
void resize(int _width, int _height); | ||
void performLayout(List<IDockContainer> children); | ||
void destroy(); | ||
void setActiveChild(IDockContainer child); | ||
void saveState(Map<String, Object> state); | ||
void loadState(Map<String, Object> state); | ||
Element get containerElement; | ||
String containerType; | ||
int get width; | ||
int get height; | ||
String name; | ||
|
||
/** | ||
* Indicates the minimum allowed child nodes a composite dock panel can have | ||
* If it's children fall below this value, the composite panel is destroyed | ||
* and it's children are moved one level up | ||
*/ | ||
int get minimumAllowedChildNodes; | ||
} | ||
|
||
part of dock_spawn; | ||
|
||
/** | ||
* Any dockable entity needs to implement this inteface | ||
*/ | ||
abstract class IDockContainer { | ||
DockManager get dockManager; | ||
void resize(int _width, int _height); | ||
void performLayout(List<IDockContainer> children); | ||
void destroy(); | ||
void setActiveChild(IDockContainer child); | ||
void saveState(Map<String, Object> state); | ||
void loadState(Map<String, Object> state); | ||
Element get containerElement; | ||
String containerType; | ||
int get width; | ||
int get height; | ||
String name; | ||
|
||
/** | ||
* Indicates the minimum allowed child nodes a composite dock panel can have | ||
* If it's children fall below this value, the composite panel is destroyed | ||
* and it's children are moved one level up | ||
*/ | ||
int get minimumAllowedChildNodes; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
part of dock_spawn; | ||
|
||
/** | ||
* The document manager is then central area of the dock layout hierarchy. | ||
* This is where more important panels are placed (e.g. the text editor in an IDE, | ||
* 3D view in a modelling package etc | ||
*/ | ||
class DocumentManagerContainer extends FillDockContainer { | ||
|
||
int get minimumAllowedChildNodes { return 0; } | ||
|
||
DocumentManagerContainer(DockManager dockManager) | ||
: super(dockManager, TabHost.DIRECTION_TOP) | ||
{ | ||
element.classes.add("document-manager"); | ||
tabHost.createTabPage = _createDocumentTabPage; | ||
tabHost.displayCloseButton = true; | ||
} | ||
|
||
TabPage _createDocumentTabPage(TabHost _tabHost, IDockContainer container) { | ||
return new DocumentTabPage(_tabHost, container); | ||
} | ||
|
||
void saveState(Map<String, Object> state) { | ||
super.saveState(state); | ||
state['documentManager'] = true; | ||
} | ||
|
||
/** Returns the selected document tab */ | ||
TabPage get selectedTab => tabHost.activeTab; | ||
} | ||
|
||
/** | ||
* Specialized tab page that doesn't display the panel's frame when docked in a tab page | ||
*/ | ||
class DocumentTabPage extends TabPage { | ||
PanelContainer panel = null; | ||
|
||
DocumentTabPage(TabHost _host, IDockContainer _container) : super(_host, _container) | ||
{ | ||
// If the container is a panel, extract the content element and set it as the tab's content | ||
if (container.containerType == "panel") { | ||
panel = container; | ||
containerElement = panel.elementContent; | ||
|
||
// detach the container element from the panel's frame. | ||
// It will be reattached when this tab page is destroyed | ||
// This enables the panel's frame (title bar etc) to be hidden | ||
// inside the tab page | ||
containerElement.remove(); | ||
} | ||
} | ||
|
||
void destroy() { | ||
super.destroy(); | ||
|
||
// Restore the panel content element back into the panel frame | ||
panel.elementContentHost.nodes.add(containerElement); | ||
} | ||
} | ||
part of dock_spawn; | ||
|
||
/** | ||
* The document manager is then central area of the dock layout hierarchy. | ||
* This is where more important panels are placed (e.g. the text editor in an IDE, | ||
* 3D view in a modelling package etc | ||
*/ | ||
class DocumentManagerContainer extends FillDockContainer { | ||
|
||
int get minimumAllowedChildNodes { return 0; } | ||
|
||
DocumentManagerContainer(DockManager dockManager) | ||
: super(dockManager, TabHost.DIRECTION_TOP) | ||
{ | ||
element.classes.add("document-manager"); | ||
tabHost.createTabPage = _createDocumentTabPage; | ||
tabHost.displayCloseButton = true; | ||
} | ||
|
||
TabPage _createDocumentTabPage(TabHost _tabHost, IDockContainer container) { | ||
return new DocumentTabPage(_tabHost, container); | ||
} | ||
|
||
void saveState(Map<String, Object> state) { | ||
super.saveState(state); | ||
state['documentManager'] = true; | ||
} | ||
|
||
/** Returns the selected document tab */ | ||
TabPage get selectedTab => tabHost.activeTab; | ||
} | ||
|
||
/** | ||
* Specialized tab page that doesn't display the panel's frame when docked in a tab page | ||
*/ | ||
class DocumentTabPage extends TabPage { | ||
PanelContainer panel = null; | ||
|
||
DocumentTabPage(TabHost _host, IDockContainer _container) : super(_host, _container) | ||
{ | ||
// If the container is a panel, extract the content element and set it as the tab's content | ||
if (container.containerType == "panel") { | ||
panel = container; | ||
containerElement = panel.elementContent; | ||
|
||
// detach the container element from the panel's frame. | ||
// It will be reattached when this tab page is destroyed | ||
// This enables the panel's frame (title bar etc) to be hidden | ||
// inside the tab page | ||
containerElement.remove(); | ||
} | ||
} | ||
|
||
void destroy() { | ||
super.destroy(); | ||
|
||
// Restore the panel content element back into the panel frame | ||
panel.elementContentHost.nodes.add(containerElement); | ||
} | ||
} |
Oops, something went wrong.