>From 24a29814e5b94844f15ef6635ab35c21a3019cf3 Mon Sep 17 00:00:00 2001
From: Gwenael Casaccio
Date: Wed, 23 Oct 2013 12:12:11 +0200
Subject: [PATCH] Migrate to new UI framework first step done: - introduce
new UI - remove most of the mainWidget calls - more rationale in widget
initialization - less Gtk dependant
---
packages/visualgst/ChangeLog | 75 ++++
.../Commands/WorkspaceMenus/DeleteItemCommand.st | 2 +-
.../Commands/WorkspaceMenus/InspectItemCommand.st | 2 +-
packages/visualgst/Debugger/Extensions.st | 3 +-
packages/visualgst/Debugger/GtkContextWidget.st | 38 +-
packages/visualgst/Debugger/GtkDebugger.st | 8 +-
packages/visualgst/Debugger/GtkStackInspector.st | 2 +-
.../visualgst/Debugger/GtkStackInspectorView.st | 3 +-
packages/visualgst/Extensions.st | 6 +
packages/visualgst/Gtk/GtkListModel.st | 133 +++++++
packages/visualgst/Gtk/GtkScrollTreeWidget.st | 83 ++++
packages/visualgst/Gtk/GtkTreeModel.st | 176 +++++++++
packages/visualgst/GtkClassSUnitWidget.st | 99 -----
packages/visualgst/GtkConcreteWidget.st | 15 +-
packages/visualgst/GtkEntryDialog.st | 10 +-
packages/visualgst/GtkEntryWidget.st | 2 +-
packages/visualgst/GtkHSidebarWidget.st | 42 --
packages/visualgst/GtkHistoryWidget.st | 59 +--
packages/visualgst/GtkLauncher.st | 81 ++--
packages/visualgst/GtkListModel.st | 133 -------
packages/visualgst/GtkMainWindow.st | 311 ---------------
packages/visualgst/GtkMethodSUnitWidget.st | 51 ---
packages/visualgst/GtkNotebookWidget.st | 187 ---------
packages/visualgst/GtkScrollTreeWidget.st | 83 ----
packages/visualgst/GtkSidebarWidget.st | 130 ------
packages/visualgst/GtkTranscriptWidget.st | 2 +-
packages/visualgst/GtkTreeModel.st | 176 ---------
packages/visualgst/GtkVSidebarWidget.st | 42 --
packages/visualgst/GtkVariableTrackerWidget.st | 29 +-
packages/visualgst/GtkVisualGSTTool.st | 2 +-
packages/visualgst/GtkWorkspaceWidget.st | 13 +-
packages/visualgst/Image/GtkImageWidget.st | 53 ++-
.../Implementors/GtkImageResultsWidget.st | 23 +-
.../Implementors/GtkImplementorResultsWidget.st | 11 +-
.../Implementors/GtkSenderResultsWidget.st | 11 +-
.../Inspector/GtkCharacterInspectorView.st | 62 ---
.../Inspector/GtkCompiledBlockInspectorView.st | 124 ------
.../Inspector/GtkCompiledMethodInspectorView.st | 133 -------
.../visualgst/Inspector/GtkContextInspectorView.st | 58 ---
.../Inspector/GtkDictionaryInspectorView.st | 53 ---
.../visualgst/Inspector/GtkFloatInspectorView.st | 51 ---
packages/visualgst/Inspector/GtkInspector.st | 29 +-
.../Inspector/GtkInspectorBrowserWidget.st | 39 +-
packages/visualgst/Inspector/GtkInspectorWidget.st | 38 +-
.../visualgst/Inspector/GtkIntegerInspectorView.st | 62 ---
.../visualgst/Inspector/GtkObjectInspectorView.st | 88 -----
.../GtkSequenceableCollectionInspectorView.st | 51 ---
.../visualgst/Inspector/GtkSetInspectorView.st | 53 ---
.../Inspector/View/GtkCharacterInspectorView.st | 62 +++
.../View/GtkCompiledBlockInspectorView.st | 124 ++++++
.../View/GtkCompiledMethodInspectorView.st | 133 +++++++
.../Inspector/View/GtkContextInspectorView.st | 58 +++
.../Inspector/View/GtkDictionaryInspectorView.st | 53 +++
.../Inspector/View/GtkFloatInspectorView.st | 51 +++
.../Inspector/View/GtkIntegerInspectorView.st | 62 +++
.../Inspector/View/GtkObjectInspectorView.st | 88 +++++
.../View/GtkSequenceableCollectionInspectorView.st | 51 +++
.../Inspector/View/GtkSetInspectorView.st | 53 +++
packages/visualgst/Menus/HistorySelectionMenus.st | 43 ++
packages/visualgst/SUnit/GtkClassSUnitWidget.st | 106 +++++
packages/visualgst/SUnit/GtkMethodSUnitWidget.st | 51 +++
packages/visualgst/SUnit/GtkSUnit.st | 60 +--
packages/visualgst/SUnit/GtkSUnitResultWidget.st | 52 +--
.../StBrowser/GtkCategorizedClassWidget.st | 69 ++--
.../StBrowser/GtkCategorizedNamespaceWidget.st | 51 ++-
packages/visualgst/StBrowser/GtkCategoryWidget.st | 64 ++-
.../visualgst/StBrowser/GtkClassBrowserWidget.st | 64 ++-
.../visualgst/StBrowser/GtkClassHierarchyWidget.st | 42 +-
packages/visualgst/StBrowser/GtkMethodWidget.st | 42 +-
packages/visualgst/Tetris/Tetris.st | 2 +-
packages/visualgst/Text/GtkFindWidget.st | 125 ------
packages/visualgst/Text/GtkReplaceWidget.st | 103 -----
packages/visualgst/Text/GtkSaveTextWidget.st | 89 -----
packages/visualgst/Text/GtkSourceCodeWidget.st | 287 --------------
packages/visualgst/Text/GtkTextPluginWidget.st | 90 -----
packages/visualgst/Text/GtkTextWidget.st | 434 ---------------------
packages/visualgst/Widget/Box.st | 82 ++++
packages/visualgst/Widget/Compoment.st | 65 +++
packages/visualgst/Widget/Entry.st | 67 ++++
packages/visualgst/Widget/HBox.st | 44 +++
packages/visualgst/Widget/HPaned.st | 44 +++
packages/visualgst/Widget/HSidebar.st | 43 ++
packages/visualgst/Widget/Label.st | 59 +++
packages/visualgst/Widget/List.st | 178 +++++++++
packages/visualgst/Widget/Notebook.st | 187 +++++++++
packages/visualgst/Widget/Paned.st | 122 ++++++
packages/visualgst/Widget/Sidebar.st | 123 ++++++
packages/visualgst/Widget/Text/GtkFindWidget.st | 125 ++++++
packages/visualgst/Widget/Text/GtkReplaceWidget.st | 103 +++++
.../visualgst/Widget/Text/GtkSaveTextWidget.st | 89 +++++
.../visualgst/Widget/Text/GtkSourceCodeWidget.st | 289 ++++++++++++++
.../visualgst/Widget/Text/GtkTextPluginWidget.st | 90 +++++
packages/visualgst/Widget/Text/GtkTextWidget.st | 433 ++++++++++++++++++++
packages/visualgst/Widget/Tree.st | 168 ++++++++
packages/visualgst/Widget/VBox.st | 44 +++
packages/visualgst/Widget/VPaned.st | 44 +++
packages/visualgst/Widget/VSidebar.st | 43 ++
packages/visualgst/Widget/Widget.st | 181 +++++++++
packages/visualgst/Widget/Window.st | 314 +++++++++++++++
packages/visualgst/package.xml | 98 ++---
100 files changed, 4758 insertions(+), 3723 deletions(-)
create mode 100644 packages/visualgst/Gtk/GtkListModel.st
create mode 100644 packages/visualgst/Gtk/GtkScrollTreeWidget.st
create mode 100644 packages/visualgst/Gtk/GtkTreeModel.st
delete mode 100644 packages/visualgst/GtkClassSUnitWidget.st
delete mode 100644 packages/visualgst/GtkHSidebarWidget.st
delete mode 100644 packages/visualgst/GtkListModel.st
delete mode 100644 packages/visualgst/GtkMainWindow.st
delete mode 100644 packages/visualgst/GtkMethodSUnitWidget.st
delete mode 100644 packages/visualgst/GtkNotebookWidget.st
delete mode 100644 packages/visualgst/GtkScrollTreeWidget.st
delete mode 100644 packages/visualgst/GtkSidebarWidget.st
delete mode 100644 packages/visualgst/GtkTreeModel.st
delete mode 100644 packages/visualgst/GtkVSidebarWidget.st
delete mode 100644 packages/visualgst/Inspector/GtkCharacterInspectorView.st
delete mode 100644 packages/visualgst/Inspector/GtkCompiledBlockInspectorView.st
delete mode 100644 packages/visualgst/Inspector/GtkCompiledMethodInspectorView.st
delete mode 100644 packages/visualgst/Inspector/GtkContextInspectorView.st
delete mode 100644 packages/visualgst/Inspector/GtkDictionaryInspectorView.st
delete mode 100644 packages/visualgst/Inspector/GtkFloatInspectorView.st
delete mode 100644 packages/visualgst/Inspector/GtkIntegerInspectorView.st
delete mode 100644 packages/visualgst/Inspector/GtkObjectInspectorView.st
delete mode 100644 packages/visualgst/Inspector/GtkSequenceableCollectionInspectorView.st
delete mode 100644 packages/visualgst/Inspector/GtkSetInspectorView.st
create mode 100644 packages/visualgst/Inspector/View/GtkCharacterInspectorView.st
create mode 100644 packages/visualgst/Inspector/View/GtkCompiledBlockInspectorView.st
create mode 100644 packages/visualgst/Inspector/View/GtkCompiledMethodInspectorView.st
create mode 100644 packages/visualgst/Inspector/View/GtkContextInspectorView.st
create mode 100644 packages/visualgst/Inspector/View/GtkDictionaryInspectorView.st
create mode 100644 packages/visualgst/Inspector/View/GtkFloatInspectorView.st
create mode 100644 packages/visualgst/Inspector/View/GtkIntegerInspectorView.st
create mode 100644 packages/visualgst/Inspector/View/GtkObjectInspectorView.st
create mode 100644 packages/visualgst/Inspector/View/GtkSequenceableCollectionInspectorView.st
create mode 100644 packages/visualgst/Inspector/View/GtkSetInspectorView.st
create mode 100644 packages/visualgst/Menus/HistorySelectionMenus.st
create mode 100644 packages/visualgst/SUnit/GtkClassSUnitWidget.st
create mode 100644 packages/visualgst/SUnit/GtkMethodSUnitWidget.st
delete mode 100644 packages/visualgst/Text/GtkFindWidget.st
delete mode 100644 packages/visualgst/Text/GtkReplaceWidget.st
delete mode 100644 packages/visualgst/Text/GtkSaveTextWidget.st
delete mode 100644 packages/visualgst/Text/GtkSourceCodeWidget.st
delete mode 100644 packages/visualgst/Text/GtkTextPluginWidget.st
delete mode 100644 packages/visualgst/Text/GtkTextWidget.st
create mode 100644 packages/visualgst/Widget/Box.st
create mode 100644 packages/visualgst/Widget/Compoment.st
create mode 100644 packages/visualgst/Widget/Entry.st
create mode 100644 packages/visualgst/Widget/HBox.st
create mode 100644 packages/visualgst/Widget/HPaned.st
create mode 100644 packages/visualgst/Widget/HSidebar.st
create mode 100644 packages/visualgst/Widget/Label.st
create mode 100644 packages/visualgst/Widget/List.st
create mode 100644 packages/visualgst/Widget/Notebook.st
create mode 100644 packages/visualgst/Widget/Paned.st
create mode 100644 packages/visualgst/Widget/Sidebar.st
create mode 100644 packages/visualgst/Widget/Text/GtkFindWidget.st
create mode 100644 packages/visualgst/Widget/Text/GtkReplaceWidget.st
create mode 100644 packages/visualgst/Widget/Text/GtkSaveTextWidget.st
create mode 100644 packages/visualgst/Widget/Text/GtkSourceCodeWidget.st
create mode 100644 packages/visualgst/Widget/Text/GtkTextPluginWidget.st
create mode 100644 packages/visualgst/Widget/Text/GtkTextWidget.st
create mode 100644 packages/visualgst/Widget/Tree.st
create mode 100644 packages/visualgst/Widget/VBox.st
create mode 100644 packages/visualgst/Widget/VPaned.st
create mode 100644 packages/visualgst/Widget/VSidebar.st
create mode 100644 packages/visualgst/Widget/Widget.st
create mode 100644 packages/visualgst/Widget/Window.st
diff --git a/packages/visualgst/ChangeLog b/packages/visualgst/ChangeLog
index 4d0c45d..59fde95 100644
--- a/packages/visualgst/ChangeLog
+++ b/packages/visualgst/ChangeLog
@@ -1,3 +1,78 @@
+2013-10-23 Gwenael Casaccio
+
+ * Commands/WorkspaceMenus/DeleteItemCommand.st: New UI support.
+ * Commands/WorkspaceMenus/InspectItemCommand.st: New UI support.
+ * Debugger/Extensions.st: Disable the debugger.
+ * Debugger/GtkContextWidget.st: Migration to new UI.
+ * Debugger/GtkDebugger.st: Migration to new UI.
+ * Debugger/GtkStackInspector.st: Migration to new UI.
+ * Debugger/GtkStackInspectorView.st: Migration to new UI.
+ * Extensions.st: Migration to new UI.
+ * Gtk/GtkListModel.st: Move to Gtk.
+ * Gtk/GtkScrollTreeWidget.st: Move to Gtk.
+ * Gtk/GtkTreeModel.st: Move to Gtk.
+ * GtkConcreteWidget.st: Update to new UI.
+ * GtkEntryDialog.st: Update to new UI.
+ * GtkEntryWidget.st: Update to new UI.
+ * GtkHistoryWidget.st: Update to new UI.
+ * GtkLauncher.st: Update to new UI.
+ * GtkTranscriptWidget.st: Update to new UI.
+ * GtkVariableTrackerWidget.st: Update to new UI.
+ * GtkVisualGSTTool.st: Update to new UI.
+ * GtkWorkspaceWidget.st: Update to new UI.
+ * Image/GtkImageWidget.st: Update to new UI.
+ * Implementors/GtkImageResultsWidget.st: Update to new UI.
+ * Implementors/GtkImplementorResultsWidget.st: Update to new UI.
+ * Implementors/GtkSenderResultsWidget.st: Update to new UI.
+ * Inspector/GtkInspector.st: Update to new UI.
+ * Inspector/GtkInspectorBrowserWidget.st: Update to new UI.
+ * Inspector/GtkInspectorWidget.st: Update to new UI.
+ * Inspector/View/GtkCharacterInspectorView.st: Move inspector view.
+ * Inspector/View/GtkCompiledBlockInspectorView.st: Move inspector view.
+ * Inspector/View/GtkCompiledMethodInspectorView.st: Move inspector view.
+ * Inspector/View/GtkContextInspectorView.st: Move inspector view.
+ * Inspector/View/GtkDictionaryInspectorView.st: Move inspector view.
+ * Inspector/View/GtkFloatInspectorView.st: Move inspector view.
+ * Inspector/View/GtkIntegerInspectorView.st: Move inspector view.
+ * Inspector/View/GtkObjectInspectorView.st: Move inspector view.
+ * Inspector/View/GtkSequenceableCollectionInspectorView.st: Move inspector view.
+ * Inspector/View/GtkSetInspectorView.st: Move inspector view.
+ * Menus/HistorySelectionMenus.st: New history popup menu.
+ * SUnit/GtkClassSUnitWidget.st: Update to new UI.
+ * SUnit/GtkMethodSUnitWidget.st: Update to new UI.
+ * SUnit/GtkSUnit.st: Update to new UI.
+ * SUnit/GtkSUnitResultWidget.st: Update to new UI.
+ * StBrowser/GtkCategorizedClassWidget.st: Update to new UI.
+ * StBrowser/GtkCategorizedNamespaceWidget.st: Update to new UI.
+ * StBrowser/GtkCategoryWidget.st: Update to new UI.
+ * StBrowser/GtkClassBrowserWidget.st: Update to new UI.
+ * StBrowser/GtkClassHierarchyWidget.st: Update to new UI.
+ * StBrowser/GtkMethodWidget.st: Update to new UI.
+ * Tetris/Tetris.st: Update to new UI.
+ * Widget/Box.st: Box widget.
+ * Widget/Compoment.st: Compoment.
+ * Widget/Entry.st: Entry widget.
+ * Widget/HBox.st: Horizontal box widget.
+ * Widget/HPaned.st: Horizontal paned widget.
+ * Widget/HSidebar.st: Horizontal sidebar widget.
+ * Widget/Label.st: Label widget.
+ * Widget/List.st: List widget.
+ * Widget/Notebook.st: Notebook widget.
+ * Widget/Paned.st: Paned widget.
+ * Widget/Sidebar.st: Sidebar widget.
+ * Widget/Text/GtkFindWidget.st: Find text widget.
+ * Widget/Text/GtkReplaceWidget.st: Replace text widget.
+ * Widget/Text/GtkSaveTextWidget.st: Save source warning widget.
+ * Widget/Text/GtkSourceCodeWidget.st: Smalltalk source widget.
+ * Widget/Text/GtkTextPluginWidget.st: Text widget plugin.
+ * Widget/Text/GtkTextWidget.st: Text widget
+ * Widget/Tree.st: Tree widget.
+ * Widget/VBox.st: Vertical box widget.
+ * Widget/VPaned.st: Vertical paned widget.
+ * Widget/VSidebar.st: Vertical sidebar widget.
+ * Widget/Widget.st: Widget.
+ * Widget/Window.st: Window widget.
+
2013-10-21 Gwenael Casaccio
* GtkConcreteWidget.st: Object is the superclass.
diff --git a/packages/visualgst/Commands/WorkspaceMenus/DeleteItemCommand.st b/packages/visualgst/Commands/WorkspaceMenus/DeleteItemCommand.st
index c0433ad..2a0a63c 100644
--- a/packages/visualgst/Commands/WorkspaceMenus/DeleteItemCommand.st
+++ b/packages/visualgst/Commands/WorkspaceMenus/DeleteItemCommand.st
@@ -43,7 +43,7 @@ Command subclass: DeleteItemCommand [
valid [
- ^ target hasSelectedItem
+ ^ target hasSelection
]
execute [
diff --git a/packages/visualgst/Commands/WorkspaceMenus/InspectItemCommand.st b/packages/visualgst/Commands/WorkspaceMenus/InspectItemCommand.st
index 2d9cf5d..2b7dd88 100644
--- a/packages/visualgst/Commands/WorkspaceMenus/InspectItemCommand.st
+++ b/packages/visualgst/Commands/WorkspaceMenus/InspectItemCommand.st
@@ -43,7 +43,7 @@ InspectItCommand subclass: InspectItemCommand [
valid [
- ^ target hasSelectedValue
+ ^ target hasSelection
]
]
diff --git a/packages/visualgst/Debugger/Extensions.st b/packages/visualgst/Debugger/Extensions.st
index 5d011b6..3895161 100644
--- a/packages/visualgst/Debugger/Extensions.st
+++ b/packages/visualgst/Debugger/Extensions.st
@@ -38,7 +38,8 @@ Behavior extend [
debuggerClass [
- ^ VisualGST.GtkDebugger
+ ^ nil
+" ^ VisualGST.GtkDebugger"
]
]
diff --git a/packages/visualgst/Debugger/GtkContextWidget.st b/packages/visualgst/Debugger/GtkContextWidget.st
index 902f6c5..50fa75e 100644
--- a/packages/visualgst/Debugger/GtkContextWidget.st
+++ b/packages/visualgst/Debugger/GtkContextWidget.st
@@ -33,14 +33,14 @@
|
======================================================================"
-GtkConcreteWidget subclass: GtkContextWidget [
- | column contextTree model context contextList |
+Compoment subclass: GtkContextWidget [
+
+ | context contextList |
GtkContextWidget class >> on: aContext [
- ^ (self new)
- initialize;
+ ^ self new
context: aContext;
yourself
]
@@ -48,14 +48,14 @@ GtkConcreteWidget subclass: GtkContextWidget [
initialize [
- self mainWidget: self buildTreeView
+ self buildTreeView
]
context: aContext [
context := aContext.
- model
+ widget
item: self buildListOfContexts;
refresh
]
@@ -74,20 +74,16 @@ GtkConcreteWidget subclass: GtkContextWidget [
buildTreeView [
-
- contextTree := GtkScrollTreeWidget createListWithModel: {{GtkColumnTextType title: 'Contexts'}}.
- contextTree connectToWhenPopupMenu: (ContextMenus on: self).
- contextTree treeView getSelection setMode: GTK.Gtk gtkSelectionBrowse.
- (model := GtkListModel on: contextTree treeView getModel)
- contentsBlock: [ :each | {each printString} ].
- ^ contextTree mainWidget
+
+ self widget: (List column: {{GtkColumnTextType title: 'Contexts'}} contents: [ :each | {each printString} ]).
+ widget popupMenu: (ContextMenus on: self).
+ widget singleSelection.
]
whenSelectionChangedSend: aSelector to: anObject [
- contextTree treeView getSelection
- connectSignal: 'changed' to: anObject selector: aSelector userData: nil
+ widget whenSelectionChangedSend: aSelector to: anObject
]
isLastContextSelected [
@@ -99,19 +95,19 @@ GtkConcreteWidget subclass: GtkContextWidget [
selectLastContext [
- contextTree treeView selectLastItem
+ widget selectLastItem
]
selectFirstContext [
- contextTree treeView selectFirstItem
+ widget selectFirstItem
]
hasSelectedContext [
- ^ contextTree treeView hasSelectedItem
+ ^ widget hasSelection
]
selectedContext [
@@ -119,15 +115,15 @@ GtkConcreteWidget subclass: GtkContextWidget [
self hasSelectedContext ifFalse: [ self error: 'Nothing is selected' ].
- ^ contextTree treeView selection
+ ^ widget selection
]
state [
"TODO: add ContextState."
- contextTree treeView hasSelectedItem ifTrue: [
- ^MethodState with: contextTree treeView selection method method ].
+ widget treeView hasSelectedItem ifTrue: [
+ ^MethodState with: self selection method ].
^BrowserState new
]
diff --git a/packages/visualgst/Debugger/GtkDebugger.st b/packages/visualgst/Debugger/GtkDebugger.st
index e93ff5d..775701a 100644
--- a/packages/visualgst/Debugger/GtkDebugger.st
+++ b/packages/visualgst/Debugger/GtkDebugger.st
@@ -117,25 +117,25 @@ GtkBrowsingTool subclass: GtkDebugger [
^ (stackInspectorWidget := GtkStackInspector new)
parentWindow: window;
initialize;
- mainWidget
+ yourself
]
buildInspectorsWidget [
- ^ GTK.GtkHPaned addAll: {self buildInspectorWidget mainWidget. self buildStackInspectorWidget}
+ ^ HPaned addAll: {self buildInspectorWidget. self buildStackInspectorWidget}
]
buildCodeAndStateWidget [
- ^ GTK.GtkVPaned addAll: {self buildSourceWidget mainWidget. self buildInspectorsWidget}
+ ^ VPaned addAll: {self buildSourceWidget. self buildInspectorsWidget}
]
buildCentralWidget [
- ^ GTK.GtkVPaned addAll: {self buildContextWidget mainWidget. self buildCodeAndStateWidget}
+ ^ VPaned addAll: {self buildContextWidget. self buildCodeAndStateWidget}
]
createExecuteMenus [
diff --git a/packages/visualgst/Debugger/GtkStackInspector.st b/packages/visualgst/Debugger/GtkStackInspector.st
index fa2f1c7..3bb1e87 100644
--- a/packages/visualgst/Debugger/GtkStackInspector.st
+++ b/packages/visualgst/Debugger/GtkStackInspector.st
@@ -40,7 +40,7 @@ GtkInspectorWidget subclass: GtkStackInspector [
object := aContext.
objectView := object stackInspectorView openOn: self object.
- model
+ inspectorTree
item: objectView;
refresh
]
diff --git a/packages/visualgst/Debugger/GtkStackInspectorView.st b/packages/visualgst/Debugger/GtkStackInspectorView.st
index 19355ab..b8ea3ee 100644
--- a/packages/visualgst/Debugger/GtkStackInspectorView.st
+++ b/packages/visualgst/Debugger/GtkStackInspectorView.st
@@ -33,7 +33,8 @@
|
======================================================================"
-GtkConcreteWidget subclass: GtkStackInspectorView [
+Object subclass: GtkStackInspectorView [
+
| object args temps |
GtkStackInspectorView class >> openOn: aContext [
diff --git a/packages/visualgst/Extensions.st b/packages/visualgst/Extensions.st
index 0661d7d..9a36b20 100644
--- a/packages/visualgst/Extensions.st
+++ b/packages/visualgst/Extensions.st
@@ -518,6 +518,12 @@ GTK.GtkTreeView extend [
^ model
]
+ unselectAll [
+
+
+ self getSelection unselectAll.
+ ]
+
selection [
diff --git a/packages/visualgst/Gtk/GtkListModel.st b/packages/visualgst/Gtk/GtkListModel.st
new file mode 100644
index 0000000..c39925c
--- /dev/null
+++ b/packages/visualgst/Gtk/GtkListModel.st
@@ -0,0 +1,133 @@
+"======================================================================
+|
+| GtkListModel class definition
+|
+======================================================================"
+
+"======================================================================
+|
+| Copyright (c) 2013
+| Gwenael Casaccio ,
+|
+|
+| This file is part of VisualGST.
+|
+| 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.
+|
+======================================================================"
+
+Object subclass: GtkListModel [
+
+ GtkListModel class >> on: aGtkListStore [
+
+
+ ^ super new
+ initialize;
+ gtkModel: aGtkListStore;
+ yourself
+ ]
+
+ | contentsBlock item model |
+
+ initialize [
+
+
+ ]
+
+ gtkModel: aGtkListStore [
+
+
+ model := aGtkListStore
+ ]
+
+ item: anObject [
+
+
+ item := anObject
+ ]
+
+ item [
+
+
+ ^ item
+ ]
+
+ contentsBlock: aBlock [
+
+
+ contentsBlock := aBlock
+ ]
+
+ contentsBlock [
+
+
+ ^ contentsBlock
+ ]
+
+ append: anItem [
+
+
+ model appendItem: ((self contentsBlock value: anItem) copyWith: anItem)
+ ]
+
+ remove: anObject [
+
+
+ | iter |
+ (iter := self findIter: anObject) ifNil: [ self error: 'item not found' ].
+ model remove: iter
+ ]
+
+ clear [
+
+
+ model clear
+ ]
+
+ refresh [
+
+
+ self clear.
+ self item ifNil: [ ^ self ].
+ self item do: [ :each | self append: each ]
+ ]
+
+ hasItem: anObject [
+
+
+ self findIter: anObject ifAbsent: [ ^ false ].
+ ^ true
+ ]
+
+ findIter: anObject ifAbsent: aBlock [
+
+
+ model do: [ :elem :iter |
+ elem last = anObject ifTrue: [ ^ iter ] ].
+ aBlock value
+ ]
+
+ findIter: anObject [
+
+
+ ^ self findIter: anObject ifAbsent: [ self error: 'Item not found' ]
+ ]
+]
+
diff --git a/packages/visualgst/Gtk/GtkScrollTreeWidget.st b/packages/visualgst/Gtk/GtkScrollTreeWidget.st
new file mode 100644
index 0000000..2bd9c4a
--- /dev/null
+++ b/packages/visualgst/Gtk/GtkScrollTreeWidget.st
@@ -0,0 +1,83 @@
+"======================================================================
+|
+| GtkScrollTreeWidget class definition
+|
+======================================================================"
+
+"======================================================================
+|
+| Copyright (c) 2013
+| Gwenael Casaccio ,
+|
+|
+| This file is part of VisualGST.
+|
+| 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.
+|
+======================================================================"
+
+GtkConcreteWidget subclass: GtkScrollTreeWidget [
+
+ GtkScrollTreeWidget class >> createListWithModel: anObject [
+
+
+ ^ self basicNew
+ treeView: (GTK.GtkTreeView createListWithModel: anObject);
+ initialize;
+ yourself
+ ]
+
+ GtkScrollTreeWidget class >> createTreeWithModel: anObject [
+
+
+ ^ self basicNew
+ treeView: (GTK.GtkTreeView createTreeWithModel: anObject);
+ initialize;
+ yourself
+ ]
+
+ | treeView |
+
+ initialize [
+
+
+ popupMenu := [ :value | ].
+ self buildTreeView.
+ self mainWidget: (GTK.GtkScrolledWindow withChild: self treeView)
+ ]
+
+ buildTreeView [
+
+
+ ]
+
+ treeView: aGtkTreeView [
+
+
+ treeView := aGtkTreeView.
+ ]
+
+ treeView [
+
+
+ ^ treeView
+ ]
+]
+
diff --git a/packages/visualgst/Gtk/GtkTreeModel.st b/packages/visualgst/Gtk/GtkTreeModel.st
new file mode 100644
index 0000000..7734f09
--- /dev/null
+++ b/packages/visualgst/Gtk/GtkTreeModel.st
@@ -0,0 +1,176 @@
+"======================================================================
+|
+| GtkTreeModel class definition
+|
+======================================================================"
+
+"======================================================================
+|
+| Copyright (c) 2013
+| Gwenael Casaccio ,
+|
+|
+| This file is part of VisualGST.
+|
+| 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.
+|
+======================================================================"
+
+Object subclass: GtkTreeModel [
+
+ GtkTreeModel class >> on: aGtkTreeStore [
+
+
+ ^ super new
+ initialize;
+ gtkModel: aGtkTreeStore;
+ yourself
+ ]
+
+ | childrenBlock contentsBlock item model |
+
+ initialize [
+
+
+ ]
+
+ gtkModel: aGtkTreeStore [
+
+
+ model := aGtkTreeStore
+ ]
+
+ connectSignal: aString to: anObject selector: aSymbol [
+
+
+ ^ model connectSignal: aString to: anObject selector: aSymbol
+ ]
+
+ item: anObject [
+
+
+ item := anObject
+ ]
+
+ item [
+
+
+ ^ item
+ ]
+
+ childrenBlock: aBlock [
+
+
+ childrenBlock := aBlock
+ ]
+
+ childrenBlock [
+
+
+ ^ childrenBlock
+ ]
+
+ contentsBlock: aBlock [
+
+
+ contentsBlock := aBlock
+ ]
+
+ contentsBlock [
+
+
+ ^ contentsBlock
+ ]
+
+ append: anObject [
+
+
+ self append: anObject with: nil
+ ]
+
+ append: anObject parent: aParentObject [
+
+
+ self append: anObject with: (self findIter: aParentObject)
+ ]
+
+ append: anItem with: aParentIter [
+
+
+ | iter |
+ iter := model append: aParentIter item: ((self contentsBlock value: anItem) copyWith: anItem).
+ (self childrenBlock value: anItem) do: [ :each | self append: each with: iter ]
+ ]
+
+ remove: anObject ifAbsent: aBlock [
+
+
+ | iter |
+ iter := self findIter: anObject ifAbsent: [ ^ aBlock value ].
+ model remove: iter
+ ]
+
+ remove: anObject [
+
+
+ self remove: anObject ifAbsent: [ self error: 'item not found' ]
+ ]
+
+ clear [
+
+
+ model clear
+ ]
+
+ refresh [
+
+
+ self clear.
+ self item ifNil: [ ^ self ].
+ (self childrenBlock value: self item) do: [ :each | self append: each with: nil ]
+ ]
+
+ hasItem: anObject [
+
+
+ self findIter: anObject ifAbsent: [ ^ false ].
+ ^ true
+ ]
+
+ findIter: anObject ifAbsent: aBlock [
+
+
+ model do: [ :elem :iter |
+ elem last = anObject ifTrue: [ ^ iter ] ].
+ aBlock value
+ ]
+
+ findIter: anObject [
+
+
+ ^ self findIter: anObject ifAbsent: [ self error: 'Item not found' ]
+ ]
+
+ includes: anObject [
+ self findIter: anObject ifAbsent: [ ^ false ].
+ ^ true
+ ]
+]
+
diff --git a/packages/visualgst/GtkClassSUnitWidget.st b/packages/visualgst/GtkClassSUnitWidget.st
deleted file mode 100644
index 24cde2e..0000000
--- a/packages/visualgst/GtkClassSUnitWidget.st
+++ /dev/null
@@ -1,99 +0,0 @@
-"======================================================================
-|
-| GtkClassSUnitWidget class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio ,
-|
-|
-| This file is part of VisualGST.
-|
-| 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.
-|
-======================================================================"
-
-GtkCategorizedClassWidget subclass: GtkClassSUnitWidget [
-
- addToModel: aClass [
-
- (aClass superclass environment == self namespace and: [ (aClass superclass category = self category or: [ self category isEmpty ]) and: [ aClass superclass ~~ Smalltalk.TestCase ] ])
- ifFalse: [ model append: aClass class ]
- ifTrue: [ model append: aClass class parent: aClass superclass class ]
- ]
-
- root [
-
-
- ^ Smalltalk.TestCase
- ]
-
- selectionMode [
-
-
- ^ GTK.Gtk gtkSelectionMultiple
- ]
-
- allClassNames [
-
-
- | classes names |
- classes := self selectedClasses.
- names := classes collect: [ :each | each name asString ].
- ^ names fold: [ :a :b | a, ', ', b ]
- ]
-
- hasSelectedClass [
-
-
- ^ (classesTree treeView getSelection getSelectedRows: nil) ~= nil
- ]
-
- selectedClass [
-
-
- ^ self selectedClasses first
- ]
-
- selectedClasses [
-
-
- self hasSelectedClass ifFalse: [ self error: 'Nothing is selected' ].
- ^ classesTree treeView selections collect: [:each| each asClass]
- ]
-
- recategorizedEvent: anEvent [
-
-
- (anEvent item inheritsFrom: TestCase) ifFalse: [ ^ self ].
- super recategorizedEvent: anEvent
- ]
-
- addEvent: anEvent [
-
-
- (anEvent item inheritsFrom: TestCase) ifFalse: [ ^ self ].
- super addEvent: anEvent
- ]
-]
-
diff --git a/packages/visualgst/GtkConcreteWidget.st b/packages/visualgst/GtkConcreteWidget.st
index 26973ec..4a54d29 100644
--- a/packages/visualgst/GtkConcreteWidget.st
+++ b/packages/visualgst/GtkConcreteWidget.st
@@ -34,7 +34,8 @@
======================================================================"
Object subclass: GtkConcreteWidget [
- | child parentWindow popupMenu |
+
+ | child parent parentWindow popupMenu |
GtkConcreteWidget class >> parentWindow: aGtkWindow [
@@ -59,6 +60,18 @@ Object subclass: GtkConcreteWidget [
]
+ parent: aWidget [
+
+
+ parent := aWidget
+ ]
+
+ parent [
+
+
+ ^ parent
+ ]
+
parentWindow: aGtkWindow [
diff --git a/packages/visualgst/GtkEntryDialog.st b/packages/visualgst/GtkEntryDialog.st
index c4f1d6d..60c2079 100644
--- a/packages/visualgst/GtkEntryDialog.st
+++ b/packages/visualgst/GtkEntryDialog.st
@@ -74,7 +74,7 @@ Object subclass: GtkEntryDialog [
result [
- ^ entryWidget getText
+ ^ entryWidget text
]
buildCentralWidget: aString on: aGtkDialog [
@@ -88,12 +88,12 @@ Object subclass: GtkEntryDialog [
defaultButton := GTK.Gtk perform: buttons first second.
aGtkDialog setDefaultResponse: defaultButton.
hbox := GTK.GtkHBox new: true spacing: 0.
- labelWidget := GTK.GtkLabel new: aString.
- entryWidget := GTK.GtkEntry new.
+ labelWidget := Label text: aString.
+ entryWidget := Entry new.
entryWidget setActivatesDefault: true.
hbox
- add: labelWidget;
- add: entryWidget;
+ add: labelWidget mainWidget;
+ add: entryWidget mainWidget;
showAll.
aGtkDialog getVBox add: hbox
]
diff --git a/packages/visualgst/GtkEntryWidget.st b/packages/visualgst/GtkEntryWidget.st
index 4b21e3a..ed2fc4f 100644
--- a/packages/visualgst/GtkEntryWidget.st
+++ b/packages/visualgst/GtkEntryWidget.st
@@ -57,7 +57,7 @@ GtkConcreteWidget subclass: GtkEntryWidget [
entry := GTK.GtkEntry new.
^ (GTK.GtkHBox new: true spacing: 3)
- add: (GTK.GtkLabel new: label);
+ add: (Label text: label) mainWidget;
add: entry;
yourself
]
diff --git a/packages/visualgst/GtkHSidebarWidget.st b/packages/visualgst/GtkHSidebarWidget.st
deleted file mode 100644
index daa86e2..0000000
--- a/packages/visualgst/GtkHSidebarWidget.st
+++ /dev/null
@@ -1,42 +0,0 @@
-"======================================================================
-|
-| GtkHSideBarWidget class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio ,
-|
-|
-| This file is part of VisualGST.
-|
-| 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.
-|
-======================================================================"
-
-GtkSidebarWidget subclass: GtkHSidebarWidget [
-
- panedOrientation [
- ^ GTK.GtkHPaned
- ]
-]
-
diff --git a/packages/visualgst/GtkHistoryWidget.st b/packages/visualgst/GtkHistoryWidget.st
index 106f1f4..0a297e4 100644
--- a/packages/visualgst/GtkHistoryWidget.st
+++ b/packages/visualgst/GtkHistoryWidget.st
@@ -33,21 +33,14 @@
|
======================================================================"
-GtkConcreteWidget subclass: GtkHistoryWidget [
- | browser model widget |
+Compoment subclass: GtkHistoryWidget [
- GtkHistoryWidget class >> new [
-
-
- ^ super new
- initialize;
- yourself
- ]
+ | browser stack |
initialize [
- self mainWidget: self buildListView
+ self buildListView.
]
browser: aBrowser [
@@ -59,40 +52,22 @@ GtkConcreteWidget subclass: GtkHistoryWidget [
buildListView [
- widget := (GTK.GtkTreeView createListWithModel: {{GtkColumnTextType title: 'History'}})
- connectSignal: 'button-press-event' to: self selector: #'onPress:event:';
- yourself.
- widget getSelection setMode: GTK.Gtk gtkSelectionBrowse.
- widget getSelection connectSignal: 'changed' to: self selector: #onSelectionChanged.
- (model := GtkListModel on: widget getModel)
- contentsBlock: [ :each | {each name displayString} ].
- ^ GTK.GtkScrolledWindow withChild: widget
+ self widget: (List column: {{GtkColumnTextType title: 'History'}} contents: [ :each | {each name displayString} ]).
+ widget popupMenu: (HistorySelectionMenus on: self) "{{'Inspect a class'. self. #inspectClass}.
+ {'Open in new tab'. self. #browseTabbedClass}.
+ {'Open in new window'. self. #browseClass}}".
+ widget singleSelection.
+ widget whenSelectionChangedSend: #onSelectionChanged to: self.
]
refresh: historyStack [
- model
- item: historyStack;
+ widget
+ item: (stack := historyStack);
refresh.
- widget selectNth: historyStack selectedIndex.
- ]
-
- onPress: aGtkWidget event: aGdkEvent [
-
-
- | menu aGdkButtonEvent |
- aGdkButtonEvent := aGdkEvent castTo: GTK.GdkEventButton type.
- aGdkButtonEvent button value = 3 ifFalse: [ ^ false ].
- menu := GTK.GtkMenu new.
- menu appendMenuItems: {{'Inspect a class'. self. #inspectClass}.
- {'Open in new tab'. self. #browseTabbedClass}.
- "{'Open in new window'. self. #browseClass}"}.
- menu attachToWidget: widget detacher: nil.
- menu popup: nil parentMenuItem: nil func: nil data: nil button: 3 activateTime: aGdkButtonEvent time value.
- menu showAll.
- ^ true
+ widget selectAt: historyStack selectedIndex.
]
targetObject [
@@ -125,9 +100,9 @@ GtkConcreteWidget subclass: GtkHistoryWidget [
onSelectionChanged [
- widget hasSelectedItem ifFalse: [ ^ self ].
- model item selectedIndex = widget selectedIndex ifTrue: [^self].
- model item selectItem: widget selectedIndex.
+ widget hasSelection ifFalse: [ ^ self ].
+ stack selectedIndex = widget selectionIndex ifTrue: [^self].
+ stack selectItem: widget selectionIndex.
]
browseTabbedClass [
@@ -135,14 +110,14 @@ GtkConcreteWidget subclass: GtkHistoryWidget [
"TODO: should reuse OpenTabbedBrowserCommand by giving a state to
GtkHistoryWidget."
- widget hasSelectedItem ifFalse: [ ^ self ].
+ widget hasSelection ifFalse: [ ^ self ].
self updateBrowser: GtkLauncher uniqueInstance classBrowser
]
state [
- ^model item current
+ ^ stack current
]
]
diff --git a/packages/visualgst/GtkLauncher.st b/packages/visualgst/GtkLauncher.st
index 8b7de66..91cd337 100644
--- a/packages/visualgst/GtkLauncher.st
+++ b/packages/visualgst/GtkLauncher.st
@@ -36,7 +36,7 @@
GtkVisualGSTTool subclass: GtkLauncher [
GtkLauncher class [ | uniqueInstance | ]
- | leftSidebar rightSidebar topSidebar packageBuilderWidget implementorResultWidget senderResultWidget senderWidget implementorWidget historyWidget browsers outputs saved imageName transcriptWidget windowsMenu systemChangeNotifier |
+ | leftSidebarP leftSidebar rightSidebar topSidebarP topSidebar packageBuilderWidget implementorResultWidget senderResultWidget senderWidget implementorWidget historyWidget browsers outputs saved imageName transcriptWidget windowsMenu systemChangeNotifier |
GtkLauncher class >> uniqueInstance [
@@ -146,7 +146,7 @@ GtkVisualGSTTool subclass: GtkLauncher [
| widget |
- widget := self buildWorkspaceWidget showAll.
+ widget := self buildWorkspaceWidget.
widget postInitialize.
outputs addWidget: widget labeled: aString.
outputs showLastPage.
@@ -309,10 +309,10 @@ GtkVisualGSTTool subclass: GtkLauncher [
subscribe [
- GtkAnnouncer current on: GtkNamespaceSelectionChanged do: [ :ann |
+ "GtkAnnouncer current on: GtkNamespaceSelectionChanged do: [ :ann |
browsers updateWidget: browsers currentWidget withLabel: ann selectedNamespace name asString].
GtkAnnouncer current on: GtkClassSelectionChanged do: [ :ann |
- browsers updateWidget: browsers currentWidget withLabel: ann selectedClass printString]
+ browsers updateWidget: browsers currentWidget withLabel: ann selectedClass printString]"
]
windowTitle [
@@ -337,26 +337,21 @@ GtkVisualGSTTool subclass: GtkLauncher [
super postInitialize.
self browserPostInitialize.
1 to: 2 do: [ :i | (outputs widgetAt: i) postInitialize ].
- leftSidebar mainWidget getParent setPosition: 270.
- topSidebar mainWidget getParent setPosition: 100.
- leftSidebar postInitialize.
- topSidebar postInitialize.
- rightSidebar postInitialize.
- window
- connectSignal: 'key-press-event' to: self selector: #'keyPressedOn:keyEvent:'
+ self hideSidebars.
+ leftSidebarP position: 150.
+ topSidebarP position: 100.
+ window connectSignal: 'key-press-event' to: self selector: #'keyPressedOn:keyEvent:'
]
buildNotebookWorkspaceWidget [
- outputs := GtkNotebookWidget new
- initialize;
+ outputs := Notebook new
parentWindow: window;
- showAll;
yourself.
^ outputs
- addPermanentWidget: (transcriptWidget := self buildTranscriptWidget) labeled: 'Transcript';
- addWidget: self buildWorkspaceWidget labeled: 'Workspace';
+ addPermanentWidget: (transcriptWidget := self buildTranscriptWidget) label: 'Transcript';
+ addWidget: self buildWorkspaceWidget label: 'Workspace';
yourself
]
@@ -369,81 +364,71 @@ GtkVisualGSTTool subclass: GtkLauncher [
buildImplementorPaned [
- leftSidebar := GtkHSidebarWidget new
- initialize;
+ leftSidebar := HSidebar new
addAll: {self buildImplementorView -> 'Implementor'. self buildSenderView -> 'Sender'. self buildHistoryView -> 'History'};
yourself.
self registerLeftPaneEvents.
- ^ leftSidebar mainWidget
+ ^ leftSidebar
]
buildPackageBuilderView [
- packageBuilderWidget := GtkPackageBuilderWidget new
+ ^ packageBuilderWidget := GtkPackageBuilderWidget new
initialize;
yourself.
- ^ packageBuilderWidget mainWidget
]
buildRightSidebarPaned [
- rightSidebar := GtkHSidebarWidget new
- initialize;
+ ^ rightSidebar := HSidebar new
addAll: {self buildPackageBuilderView -> 'Package Builder'};
yourself.
- ^ rightSidebar mainWidget
]
buildBrowserAndWorkspaceWidget [
- ^ GTK.GtkVPaned addAll: {
- GTK.GtkHPaned addAll: {self buildImplementorPaned. self buildBottomPanedAndClassBrowser. self buildRightSidebarPaned}.
- self buildNotebookWorkspaceWidget mainWidget}
+ ^ VPaned addAll:
+ { leftSidebarP := HPaned addAll: { self buildImplementorPaned. self buildBottomPanedAndClassBrowser. self buildRightSidebarPaned }.
+ self buildNotebookWorkspaceWidget }
]
buildImplementorView [
- implementorWidget := self buildImageView
+ ^ implementorWidget := self buildImageView
whenSelectionChangedSend: #implementorSelected to: self;
yourself.
- ^ implementorWidget mainWidget
]
buildSenderView [
- senderWidget := self buildImageView
+ ^ senderWidget := self buildImageView
whenSelectionChangedSend: #senderSelected to: self;
yourself.
- ^ senderWidget mainWidget
]
buildImageView [
^ GtkImageWidget new
- initialize;
- yourself
]
buildHistoryView [
- historyWidget := GtkHistoryWidget new
+ ^ historyWidget := GtkHistoryWidget new
browser: self;
yourself.
- ^ historyWidget mainWidget
]
buildImplementorResultList [
^ implementorResultWidget := GtkImplementorResultsWidget new
- initialize;
whenSelectionChangedSend: #resultImplementorSelected to: self;
yourself
]
@@ -452,7 +437,6 @@ GtkVisualGSTTool subclass: GtkLauncher [
^ senderResultWidget := GtkSenderResultsWidget new
- initialize;
whenSelectionChangedSend: #resultSenderSelected to: self;
yourself
]
@@ -460,27 +444,24 @@ GtkVisualGSTTool subclass: GtkLauncher [
buildTopSidebar [
- topSidebar := GtkHSidebarWidget new
- initialize;
- addAll: {self buildImplementorResultList mainWidget -> ''. self buildSenderResultList mainWidget -> ''};
+ ^ topSidebar := HSidebar new
+ addAll: {self buildImplementorResultList -> ''. self buildSenderResultList -> ''};
hideTabs;
yourself.
- ^ topSidebar mainWidget
]
buildBottomPanedAndClassBrowser [
- ^ GTK.GtkVPaned addAll: {self buildTopSidebar. self buildClassBrowserTabbedWidget mainWidget}
+ ^ topSidebarP := VPaned addAll: {self buildTopSidebar. self buildClassBrowserTabbedWidget}
]
buildClassBrowserTabbedWidget [
- ^ (browsers := GtkNotebookWidget parentWindow: window)
- showAll;
+ ^ (browsers := Notebook parentWindow: window)
whenSelectionChangedSend: #historyChanged to: self;
- addWidget: self buildClassBrowserWidget labeled: 'Browser';
+ addWidget: self buildClassBrowserWidget label: 'Browser';
yourself
]
@@ -508,9 +489,9 @@ GtkVisualGSTTool subclass: GtkLauncher [
leftSidebar
- whenWidgetIsVisible: implementorWidget mainWidget send: #switchToImplementor to: self;
- whenWidgetIsVisible: senderWidget mainWidget send: #switchToSender to: self;
- whenWidgetIsVisible: historyWidget mainWidget send: #switchToHistory to: self.
+ whenWidgetIsVisible: implementorWidget send: #switchToImplementor to: self;
+ whenWidgetIsVisible: senderWidget send: #switchToSender to: self;
+ whenWidgetIsVisible: historyWidget send: #switchToHistory to: self.
]
createEditMenus [
@@ -817,8 +798,8 @@ GtkVisualGSTTool subclass: GtkLauncher [
| isVisible |
isVisible := aGtkWidget isVisible.
- leftSidebar mainWidget getParent getPosition = 0 ifTrue: [ isVisible := false. leftSidebar mainWidget getParent setPosition: 270 ].
- topSidebar mainWidget getParent getPosition = 0 ifTrue: [ isVisible := false. topSidebar mainWidget getParent setPosition: 100 ].
+ leftSidebarP position = 0 ifTrue: [ isVisible := false. leftSidebarP position: 150 ].
+ topSidebarP position = 0 ifTrue: [ isVisible := false. topSidebarP position: 100 ].
self hideSidebars.
isVisible
ifFalse: [
diff --git a/packages/visualgst/GtkListModel.st b/packages/visualgst/GtkListModel.st
deleted file mode 100644
index c39925c..0000000
--- a/packages/visualgst/GtkListModel.st
+++ /dev/null
@@ -1,133 +0,0 @@
-"======================================================================
-|
-| GtkListModel class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio ,
-|
-|
-| This file is part of VisualGST.
-|
-| 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.
-|
-======================================================================"
-
-Object subclass: GtkListModel [
-
- GtkListModel class >> on: aGtkListStore [
-
-
- ^ super new
- initialize;
- gtkModel: aGtkListStore;
- yourself
- ]
-
- | contentsBlock item model |
-
- initialize [
-
-
- ]
-
- gtkModel: aGtkListStore [
-
-
- model := aGtkListStore
- ]
-
- item: anObject [
-
-
- item := anObject
- ]
-
- item [
-
-
- ^ item
- ]
-
- contentsBlock: aBlock [
-
-
- contentsBlock := aBlock
- ]
-
- contentsBlock [
-
-
- ^ contentsBlock
- ]
-
- append: anItem [
-
-
- model appendItem: ((self contentsBlock value: anItem) copyWith: anItem)
- ]
-
- remove: anObject [
-
-
- | iter |
- (iter := self findIter: anObject) ifNil: [ self error: 'item not found' ].
- model remove: iter
- ]
-
- clear [
-
-
- model clear
- ]
-
- refresh [
-
-
- self clear.
- self item ifNil: [ ^ self ].
- self item do: [ :each | self append: each ]
- ]
-
- hasItem: anObject [
-
-
- self findIter: anObject ifAbsent: [ ^ false ].
- ^ true
- ]
-
- findIter: anObject ifAbsent: aBlock [
-
-
- model do: [ :elem :iter |
- elem last = anObject ifTrue: [ ^ iter ] ].
- aBlock value
- ]
-
- findIter: anObject [
-
-
- ^ self findIter: anObject ifAbsent: [ self error: 'Item not found' ]
- ]
-]
-
diff --git a/packages/visualgst/GtkMainWindow.st b/packages/visualgst/GtkMainWindow.st
deleted file mode 100644
index 98b8c12..0000000
--- a/packages/visualgst/GtkMainWindow.st
+++ /dev/null
@@ -1,311 +0,0 @@
-"======================================================================
-|
-| GtkMainWindow class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio ,
-|
-|
-| This file is part of VisualGST.
-|
-| 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.
-|
-======================================================================"
-
-Smalltalk.Object subclass: GtkMainWindow [
- | window container menuBar toolBar centralWidget statusBar accelGroup |
-
- GtkMainWindow class >> open [
-
-
- ^ (self new)
- initialize;
- showAll;
- postInitialize;
- yourself
- ]
-
- GtkMainWindow class >> openSized: aPoint [
-
-
- ^ (self new)
- initialize;
- resize: aPoint;
- showAll;
- postInitialize;
- yourself
- ]
-
- centralWidget [
-
-
- ^ centralWidget
- ]
-
- centralWidget: aGtkWidget [
-
-
- centralWidget := aGtkWidget
- ]
-
- container [
-
-
- ^ container ifNil: [ container := GTK.GtkVBox new: false spacing: 0 ]
- ]
-
- accelGroup [
-
-
- ^ accelGroup ifNil: [ accelGroup := GTK.GtkAccelGroup new ]
- ]
-
- menuBar [
-
-
- ^ menuBar ifNil: [ menuBar := GTK.GtkMenuBar new ]
- ]
-
- menuBar: aGtkMenuBar [
-
-
- menuBar := aGtkMenuBar
- ]
-
- statusBar [
-
-
- ^ statusBar ifNil: [ statusBar := GTK.GtkStatusbar new ]
- ]
-
- statusBar: aGtkStatusBar [
-
-
- statusBar := aGtkStatusBar
- ]
-
- title [
-
-
- ^ window title
- ]
-
- title: aString [
-
-
- window setTitle: aString
- ]
-
- toolBar [
-
-
- ^ toolBar ifNil: [ toolBar := GTK.GtkToolbar new ]
- ]
-
- toolBar: aGtkToolBar [
-
-
- toolBar := aGtkToolBar
- ]
-
- aboutGst [
-
-
- (GTK.GtkAboutDialog new)
- setProgramName: 'GNU Smalltalk';
- setVersion: (Smalltalk version =~ 'version (.*)' at: 1);
- setLicense: 'GNU Smalltalk is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later version.
-
-GNU Smalltalk is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-details.
-
-You should have received a copy of the GNU General Public License along with
-GNU Smalltalk; see the file COPYING. If not, write to the Free Software
-Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-Please consult the GNU Smalltalk source code for additional permissions
-that are specific to this version of GNU Smalltalk.';
- setWebsite: 'http://smalltalk.gnu.org/';
- showModalDestroy
- ]
-
- close [
-
-
- window hideAll
- ]
-
- initialize [
-
-
- window := GTK.GtkWindow new: GTK.Gtk gtkWindowToplevel.
- window addAccelGroup: self accelGroup.
- self
- title: self windowTitle;
- createMenus;
- createToolbar;
- createStatusBar;
- centralWidget: self buildCentralWidget.
- ]
-
- buildCentralWidget [
-
- ^nil
- ]
-
- createStatusBar [
-
-
- self statusMessage: self windowTitle
- ]
-
- windowTitle [
-
- ^self class name
- ]
-
- createToolbar [
-
- ]
-
- createMenus [
-
- ]
-
- postInitialize [
-
-
- window
- connectSignal: 'delete-event' to: self selector: #'onDelete:event:'
- ]
-
- onDelete: aGtkWidget event: aGdkEvent [
-
-
- window hideAll.
- ^ true
- ]
-
- addMenuItem: aString [
-
-
- self menuBar append: (GTK.GtkMenuItem newWithLabel: aString)
- ]
-
- addMenuItem: aString withSubmenu: aGtkMenuItemArray [
-
-
- self menuBar append:
- ((GTK.GtkMenuItem newWithLabel: aString)
- setSubmenu: (self createNewMenuEntry: aGtkMenuItemArray))
- ]
-
- createMainMenu: anArray [
-
-
- anArray do: [ :each |
- self addMenuItem: each first withSubmenu: (self perform: each second) ]
- ]
-
- createNewMenuEntry: anArray [
-
-
- | menu |
- menu := (GTK.GtkMenu new)
- setAccelGroup: self accelGroup;
- yourself.
- anArray do: [ :each |
- menu append: each ].
- ^ menu
- ]
-
- statusMessage: aString [
-
-
- self statusBar
- push: 0 text: aString
- ]
-
- appendSeparator [
-
-
- self appendToolItem: GTK.GtkSeparatorToolItem new
- ]
-
- appendToolItem: aGtkToolItem [
-
-
- self toolBar insert: aGtkToolItem pos: -1
- ]
-
- appendWidget: aGtkWidget [
-
-
- self appendToolItem: ((GTK.GtkToolItem new) add: aGtkWidget)
- ]
-
- resize: aPoint [
-
-
- window resize: aPoint x height: aPoint y
- ]
-
- showAll [
- {menuBar->false. toolBar->false. centralWidget->true. statusBar->false} do: [ :each |
- each key ifNotNil: [ self container
- packStart: each key expand: each value fill: true padding: 0 ] ].
-
- window
- add: self container;
- showAll
- ]
-
- focusedWidget [
-
-
- self subclassResponsibility
- ]
-
- onFocusPerform: aSymbol [
-
-
- | widget |
- widget := self focusedWidget.
- widget isNil ifTrue: [ ^ self ].
- ^ widget perform: aSymbol
- ]
-
- onFocusPerform: aSymbol with: anObject [
-
-
- | widget |
- widget := self focusedWidget.
- widget isNil ifTrue: [ ^ self ].
- ^ widget perform: aSymbol with: anObject
- ]
-]
diff --git a/packages/visualgst/GtkMethodSUnitWidget.st b/packages/visualgst/GtkMethodSUnitWidget.st
deleted file mode 100644
index a3d6a38..0000000
--- a/packages/visualgst/GtkMethodSUnitWidget.st
+++ /dev/null
@@ -1,51 +0,0 @@
-"======================================================================
-|
-| GtkMethodSUnitWidget class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio ,
-|
-|
-| This file is part of VisualGST.
-|
-| 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.
-|
-======================================================================"
-
-GtkMethodWidget subclass: GtkMethodSUnitWidget [
-
- category: aString [
-
-
- category := aString.
- self classOrMeta methodDictionary ifNil: [
- model clear.
- ^ self].
- model
- item: ((self classOrMeta methodDictionary select: [ :each | self category = '*' or: [ each methodCategory = self category and: [ each selector matchRegex: 'test' from: 1 to: 4 ] ] ])
- asArray sort: [ :a :b | a selector <= b selector ]);
- refresh
- ]
-]
-
diff --git a/packages/visualgst/GtkNotebookWidget.st b/packages/visualgst/GtkNotebookWidget.st
deleted file mode 100644
index cb280b5..0000000
--- a/packages/visualgst/GtkNotebookWidget.st
+++ /dev/null
@@ -1,187 +0,0 @@
-"======================================================================
-|
-| GtkNotebookWidget class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio ,
-|
-|
-| This file is part of VisualGST.
-|
-| 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.
-|
-======================================================================"
-
-GtkConcreteWidget subclass: GtkNotebookWidget [
- | currentWidget selectMessage notebook pages labels |
-
- initialize [
-
-
- labels := OrderedCollection new.
- pages := OrderedCollection new.
- self mainWidget: self buildNotebookWidget
- ]
-
- buildNotebookWidget [
-
-
- ^ notebook := GTK.GtkNotebook new
- connectSignal: 'switch-page'
- to: self
- selector: #'switchPageOn:page:number:'
- userData: nil;
- setShowTabs: false;
- yourself
- ]
-
- whenSelectionChangedSend: aSymbol to: anObject [
- selectMessage := DirectedMessage receiver: anObject selector: aSymbol arguments: #()
- ]
-
- addWidget: aWidget labeled: aString [
-
-
- self addWidget: aWidget labelWidget: (self buildLabelWidget: aString withIcon: GTK.Gtk gtkStockClose at: aWidget)
- ]
-
-
- updateWidget: aWidget withLabel: aString [
-
-
- notebook setTabLabel: aWidget mainWidget tabLabel: (self buildLabelWidget: aString withIcon: GTK.Gtk gtkStockClose at: aWidget)
- ]
-
- addPermanentWidget: aWidget labeled: aString [
-
-
- self addWidget: aWidget labelWidget: (labels add: (GTK.GtkLabel new: aString))
- ]
-
- addWidget: aWidget labelWidget: aLabelWidget [
-
-
- currentWidget ifNil: [ currentWidget := aWidget ].
- pages addLast: aWidget.
- notebook
- appendPage: aWidget mainWidget tabLabel: aLabelWidget.
- pages size > 1 ifTrue: [ notebook setShowTabs: true ]
- ]
-
- buildLabelWidget: aString withIcon: aStockString at: aSmallInteger [
-
-
- | image close |
- image := GTK.GtkImage newFromStock: aStockString size: GTK.Gtk gtkIconSizeMenu.
- close := (GTK.GtkButton new)
- setImage: image;
- setRelief: GTK.Gtk gtkReliefNone;
- connectSignal: 'pressed' to: self selector: #'closeIt:at:' userData: aSmallInteger;
- yourself.
- ^ (GTK.GtkHBox new: false spacing: 0)
- add: (labels add: (GTK.GtkLabel new: aString));
- add: close;
- showAll;
- yourself
- ]
-
- switchPageOn: aGtkNotebook page: aGtkNotebookPage number: anInteger [
-
-
- currentWidget := pages at: anInteger + 1.
- selectMessage ifNotNil: [ selectMessage send ]
- ]
-
- closeIt: aGtkButton at: aGtkConcreteWidget [
-
-
- | pageNb |
- pageNb := notebook pageNum: aGtkConcreteWidget mainWidget.
- aGtkConcreteWidget close.
- pages removeAtIndex: pageNb + 1.
- labels removeAtIndex: pageNb + 1.
- notebook removePage: pageNb.
- pages size = 1 ifTrue: [ notebook setShowTabs: false ]
- ]
-
- widgetAt: anInteger [
-
-
- ^ pages at: anInteger
- ]
-
- currentWidget [
-
-
- ^ currentWidget
- ]
-
- focusedWidget [
-
-
- ^ currentWidget focusedWidget
- ]
-
- currentPage [
-
-
- ^ notebook getCurrentPage
- ]
-
- currentPage: aSmallInteger [
-
-
- notebook setCurrentPage: aSmallInteger
- ]
-
- showLastPage [
-
-
- self currentPage: self numberOfPages - 1
- ]
-
- numberOfPages [
-
-
- ^ notebook getNPages
- ]
-
- closeCurrentPage [
-
-
- self numberOfPages = 1 ifTrue: [ ^ self ].
- pages removeAtIndex: self currentPage + 1.
- labels removeAtIndex: self currentPage + 1.
- notebook removePage: self currentPage.
- pages size = 1 ifTrue: [ notebook setShowTabs: false ]
- ]
-
- showPane [
-
-
- notebook showAll.
- pages do: [ :each | each postInitialize ]
- ]
-]
-
diff --git a/packages/visualgst/GtkScrollTreeWidget.st b/packages/visualgst/GtkScrollTreeWidget.st
deleted file mode 100644
index 2bd9c4a..0000000
--- a/packages/visualgst/GtkScrollTreeWidget.st
+++ /dev/null
@@ -1,83 +0,0 @@
-"======================================================================
-|
-| GtkScrollTreeWidget class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio ,
-|
-|
-| This file is part of VisualGST.
-|
-| 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.
-|
-======================================================================"
-
-GtkConcreteWidget subclass: GtkScrollTreeWidget [
-
- GtkScrollTreeWidget class >> createListWithModel: anObject [
-
-
- ^ self basicNew
- treeView: (GTK.GtkTreeView createListWithModel: anObject);
- initialize;
- yourself
- ]
-
- GtkScrollTreeWidget class >> createTreeWithModel: anObject [
-
-
- ^ self basicNew
- treeView: (GTK.GtkTreeView createTreeWithModel: anObject);
- initialize;
- yourself
- ]
-
- | treeView |
-
- initialize [
-
-
- popupMenu := [ :value | ].
- self buildTreeView.
- self mainWidget: (GTK.GtkScrolledWindow withChild: self treeView)
- ]
-
- buildTreeView [
-
-
- ]
-
- treeView: aGtkTreeView [
-
-
- treeView := aGtkTreeView.
- ]
-
- treeView [
-
-
- ^ treeView
- ]
-]
-
diff --git a/packages/visualgst/GtkSidebarWidget.st b/packages/visualgst/GtkSidebarWidget.st
deleted file mode 100644
index 86e3592..0000000
--- a/packages/visualgst/GtkSidebarWidget.st
+++ /dev/null
@@ -1,130 +0,0 @@
-"======================================================================
-|
-| GtkSidebarWidget class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio ,
-|
-|
-| This file is part of VisualGST.
-|
-| 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.
-|
-======================================================================"
-
-GtkConcreteWidget subclass: GtkSidebarWidget [
- | activeWidget widgets widgetEvents paned |
-
- initialize [
-
-
- paned := GTK.GtkNotebook new
- setTabPos: GTK.Gtk gtkPosBottom;
- connectSignal: 'switch-page' to: self selector: #'switchPageOn:page:number:';
- yourself.
- self mainWidget: paned.
- widgetEvents := Dictionary new.
- widgets := OrderedCollection new
- ]
-
- postInitialize [
-
-
- self hideAll
- ]
-
- add: aGtkWidget labeled: aString [
-
-
- paned
- appendPage: aGtkWidget tabLabel: (GTK.GtkLabel new: aString).
- widgets add: aGtkWidget
- ]
-
- addAll: anArray [
-
-
- anArray do: [ :each | self add: each key labeled: each value ]
- ]
-
- show: anIndex [
-
-
- activeWidget ifNotNil: [ :aWidget | aWidget hideAll ].
- self mainWidget showAll.
- self mainWidget setCurrentPage: anIndex - 1.
- activeWidget := (widgets at: anIndex)
- showAll;
- yourself
- ]
-
- showAll [
-
-
- self mainWidget show
- ]
-
- hideTabs [
-
-
- self mainWidget setShowTabs: false
- ]
-
- hide [
-
-
- self hideMainPained
- ]
-
- hideAll [
-
-
- self hideMainPained
- ]
-
- hideMainPained [
-
-
- self mainWidget hideAll
- ]
-
- panedOrientation [
-
-
- ^ self subclassResponsibility
- ]
-
- switchPageOn: aGtkNotebook page: aGtkNotebookPage number: anInteger [
-
-
- widgetEvents at: (aGtkNotebook getNthPage: anInteger) ifPresent: [ :msg | msg value ]
- ]
-
- whenWidgetIsVisible: aGtkWidget send: aSymbol to: anObject [
-
-
- widgetEvents at: aGtkWidget put: (DirectedMessage receiver: anObject selector: aSymbol arguments: #())
- ]
-]
-
diff --git a/packages/visualgst/GtkTranscriptWidget.st b/packages/visualgst/GtkTranscriptWidget.st
index d724e07..65a308b 100644
--- a/packages/visualgst/GtkTranscriptWidget.st
+++ b/packages/visualgst/GtkTranscriptWidget.st
@@ -38,7 +38,7 @@ GtkWorkspaceWidget subclass: GtkTranscriptWidget [
initialize [
- Transcript message: self->#update:.
+ "Transcript message: self->#update:."
super initialize
]
diff --git a/packages/visualgst/GtkTreeModel.st b/packages/visualgst/GtkTreeModel.st
deleted file mode 100644
index 7734f09..0000000
--- a/packages/visualgst/GtkTreeModel.st
+++ /dev/null
@@ -1,176 +0,0 @@
-"======================================================================
-|
-| GtkTreeModel class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio ,
-|
-|
-| This file is part of VisualGST.
-|
-| 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.
-|
-======================================================================"
-
-Object subclass: GtkTreeModel [
-
- GtkTreeModel class >> on: aGtkTreeStore [
-
-
- ^ super new
- initialize;
- gtkModel: aGtkTreeStore;
- yourself
- ]
-
- | childrenBlock contentsBlock item model |
-
- initialize [
-
-
- ]
-
- gtkModel: aGtkTreeStore [
-
-
- model := aGtkTreeStore
- ]
-
- connectSignal: aString to: anObject selector: aSymbol [
-
-
- ^ model connectSignal: aString to: anObject selector: aSymbol
- ]
-
- item: anObject [
-
-
- item := anObject
- ]
-
- item [
-
-
- ^ item
- ]
-
- childrenBlock: aBlock [
-
-
- childrenBlock := aBlock
- ]
-
- childrenBlock [
-
-
- ^ childrenBlock
- ]
-
- contentsBlock: aBlock [
-
-
- contentsBlock := aBlock
- ]
-
- contentsBlock [
-
-
- ^ contentsBlock
- ]
-
- append: anObject [
-
-
- self append: anObject with: nil
- ]
-
- append: anObject parent: aParentObject [
-
-
- self append: anObject with: (self findIter: aParentObject)
- ]
-
- append: anItem with: aParentIter [
-
-
- | iter |
- iter := model append: aParentIter item: ((self contentsBlock value: anItem) copyWith: anItem).
- (self childrenBlock value: anItem) do: [ :each | self append: each with: iter ]
- ]
-
- remove: anObject ifAbsent: aBlock [
-
-
- | iter |
- iter := self findIter: anObject ifAbsent: [ ^ aBlock value ].
- model remove: iter
- ]
-
- remove: anObject [
-
-
- self remove: anObject ifAbsent: [ self error: 'item not found' ]
- ]
-
- clear [
-
-
- model clear
- ]
-
- refresh [
-
-
- self clear.
- self item ifNil: [ ^ self ].
- (self childrenBlock value: self item) do: [ :each | self append: each with: nil ]
- ]
-
- hasItem: anObject [
-
-
- self findIter: anObject ifAbsent: [ ^ false ].
- ^ true
- ]
-
- findIter: anObject ifAbsent: aBlock [
-
-
- model do: [ :elem :iter |
- elem last = anObject ifTrue: [ ^ iter ] ].
- aBlock value
- ]
-
- findIter: anObject [
-
-
- ^ self findIter: anObject ifAbsent: [ self error: 'Item not found' ]
- ]
-
- includes: anObject [
- self findIter: anObject ifAbsent: [ ^ false ].
- ^ true
- ]
-]
-
diff --git a/packages/visualgst/GtkVSidebarWidget.st b/packages/visualgst/GtkVSidebarWidget.st
deleted file mode 100644
index f633039..0000000
--- a/packages/visualgst/GtkVSidebarWidget.st
+++ /dev/null
@@ -1,42 +0,0 @@
-"======================================================================
-|
-| GtkVSidebarWidget class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio ,
-|
-|
-| This file is part of VisualGST.
-|
-| 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.
-|
-======================================================================"
-
-GtkSidebarWidget subclass: GtkVSidebarWidget [
-
- panedOrientation [
- ^ GTK.GtkVPaned
- ]
-]
-
diff --git a/packages/visualgst/GtkVariableTrackerWidget.st b/packages/visualgst/GtkVariableTrackerWidget.st
index 52e8642..6b295fe 100644
--- a/packages/visualgst/GtkVariableTrackerWidget.st
+++ b/packages/visualgst/GtkVariableTrackerWidget.st
@@ -33,14 +33,14 @@
|
======================================================================"
-GtkConcreteWidget subclass: GtkVariableTrackerWidget [
- | model object widget |
+Compoment subclass: GtkVariableTrackerWidget [
+
+ | object |
GtkVariableTrackerWidget class >> on: anObject [
^ self new
- initialize;
object: anObject;
yourself
]
@@ -48,7 +48,7 @@ GtkConcreteWidget subclass: GtkVariableTrackerWidget [
initialize [
- self mainWidget: self buildListView
+ self buildListView.
]
object: anObject [
@@ -61,18 +61,15 @@ GtkConcreteWidget subclass: GtkVariableTrackerWidget [
buildListView [
- widget := GtkScrollTreeWidget createListWithModel: {{GtkColumnTextType title: 'Variable'}. {GtkColumnTextType title: 'Value'}}.
- widget connectToWhenPopupMenu: (WorkspaceVariableMenus on: self).
- widget treeView getSelection setMode: GTK.Gtk gtkSelectionBrowse.
- (model := GtkListModel on: widget treeView getModel)
- contentsBlock: [ :each | {each asString. (object instVarNamed: each) displayString} ].
- ^ widget mainWidget
+ self widget: (List column: {{GtkColumnTextType title: 'Variable'}. {GtkColumnTextType title: 'Value'}} contents: [ :each | {each asString. (object instVarNamed: each) displayString} ]).
+ widget popupMenu: (WorkspaceVariableMenus on: self).
+ widget singleSelection.
]
refresh [
- model
+ widget
item: object class allInstVarNames;
refresh
]
@@ -83,16 +80,16 @@ GtkConcreteWidget subclass: GtkVariableTrackerWidget [
^ object instVarNamed: self selectedValue
]
- hasSelectedValue [
+ hasSelection [
- ^widget treeView hasSelectedValue
+ ^ widget hasSelection
]
selectedValue [
- ^widget treeView selection
+ ^ widget selection
]
inspectIt: anObject [
@@ -105,10 +102,10 @@ GtkConcreteWidget subclass: GtkVariableTrackerWidget [
| ivar |
- widget treeView hasSelectedValue ifFalse: [ ^ self ].
+ widget hasSelection ifFalse: [ ^ self ].
ivar := self selectedValue.
- model remove: ivar.
object class removeInstVarName: ivar.
+ widget refresh
]
]
diff --git a/packages/visualgst/GtkVisualGSTTool.st b/packages/visualgst/GtkVisualGSTTool.st
index fa85181..17c6e5f 100644
--- a/packages/visualgst/GtkVisualGSTTool.st
+++ b/packages/visualgst/GtkVisualGSTTool.st
@@ -33,7 +33,7 @@
|
======================================================================"
-GtkMainWindow subclass: GtkVisualGSTTool [
+Window subclass: GtkVisualGSTTool [
GtkVisualGSTTool class >> version [
diff --git a/packages/visualgst/GtkWorkspaceWidget.st b/packages/visualgst/GtkWorkspaceWidget.st
index fa55a3f..6729eca 100644
--- a/packages/visualgst/GtkWorkspaceWidget.st
+++ b/packages/visualgst/GtkWorkspaceWidget.st
@@ -58,10 +58,13 @@ GtkTextWidget subclass: GtkWorkspaceWidget [
buildWidget [
- ^ (GTK.GtkHPaned new)
- add1: (variableWidget := GtkVariableTrackerWidget on: object) mainWidget;
- add2: super buildWidget;
- yourself
+ | root |
+ super buildWidget.
+ root := child.
+ child := GTK.GtkHPaned new.
+ child
+ add1: (variableWidget := GtkVariableTrackerWidget on: object) mainWidget;
+ add2: root
]
object: anObject [
@@ -120,7 +123,7 @@ GtkTextWidget subclass: GtkWorkspaceWidget [
showIVar [
- variableWidget mainWidget getVisible
+ variableWidget isVisible
ifFalse: [ variableWidget showAll ]
ifTrue: [ variableWidget hideAll ].
]
diff --git a/packages/visualgst/Image/GtkImageWidget.st b/packages/visualgst/Image/GtkImageWidget.st
index 506752d..15c8782 100644
--- a/packages/visualgst/Image/GtkImageWidget.st
+++ b/packages/visualgst/Image/GtkImageWidget.st
@@ -33,55 +33,50 @@
|
======================================================================"
-GtkConcreteWidget subclass: GtkImageWidget [
-
- | imageTree image model searchEntry |
+Compoment subclass: GtkImageWidget [
+ | imageTree image searchEntry |
initialize [
- self mainWidget: self buildMainWidget
+ self buildMainWidget
]
buildMainWidget [
- ^ GTK.GtkVPaned new
- add1: self buildFinderEntry;
- add2: self buildClassAndMethodList;
- yourself
+ self widget:
+ (VBox new
+ add: self buildFinderEntry;
+ add: self buildClassAndMethodList expand: true)
]
buildFinderEntry [
- searchEntry := GTK.GtkEntry new
- connectSignal: 'activate' to: self selector: #searchValidate;
+ searchEntry := Entry new
+ whenTextChangedSend: #searchValidate to: self;
yourself.
- ^ (GTK.GtkHBox new: true spacing: 3)
- add: (GTK.GtkLabel new: 'Class or method :');
- add: searchEntry;
- yourself
+ ^ HBox new
+ add: (Label text: 'Class or method :');
+ add: searchEntry expand: true
]
buildClassAndMethodList [
- imageTree := (GTK.GtkTreeView createListWithModel: {{GtkColumnTextType title: 'Methods and Classes'}}).
- imageTree setSearchEntry: searchEntry.
- [ (model := GtkListModel on: imageTree getModel)
- item: (image := GtkImage new);
- contentsBlock: [ :each | {each displayString} ];
- refresh ] fork.
- ^ GTK.GtkScrolledWindow withChild: imageTree
+ imageTree := List column: {{GtkColumnTextType title: 'Methods and Classes'}} contents: [ :each | {each displayString} ].
+ [ imageTree
+ item: (image := GtkImage new);
+ refresh ] fork.
+ ^ imageTree
]
whenSelectionChangedSend: aSelector to: anObject [
- imageTree getSelection
- connectSignal: 'changed' to: anObject selector: aSelector
+ imageTree whenSelectionChangedSend: aSelector to: anObject
]
whenTextChangedSend: aSelector to: anObject [
@@ -99,22 +94,22 @@ GtkConcreteWidget subclass: GtkImageWidget [
text [
- ^ searchEntry getText
+ ^ searchEntry text
]
searchValidate [
- searchEntry getText isEmpty
- ifTrue: [ model item: image ]
- ifFalse: [ model item: (image matchRegex: searchEntry getText) ].
- model refresh
+ searchEntry text isEmpty
+ ifTrue: [ imageTree item: image ]
+ ifFalse: [ imageTree item: (image matchRegex: searchEntry text) ].
+ imageTree refresh
]
hasSelection [
- ^ imageTree hasSelectedItem
+ ^ imageTree hasSelection
]
selection [
diff --git a/packages/visualgst/Implementors/GtkImageResultsWidget.st b/packages/visualgst/Implementors/GtkImageResultsWidget.st
index 986904c..c8ac273 100644
--- a/packages/visualgst/Implementors/GtkImageResultsWidget.st
+++ b/packages/visualgst/Implementors/GtkImageResultsWidget.st
@@ -33,49 +33,46 @@
|
======================================================================"
-GtkConcreteWidget subclass: GtkImageResultsWidget [
- | result resultTree model |
+Compoment subclass: GtkImageResultsWidget [
+
+ | result |
initialize [
- self mainWidget: self buildTreeView
+ self buildTreeView
]
buildTreeView [
- resultTree := GTK.GtkTreeView createListWithModel: {{GtkColumnTextType title: 'Methods and Classes'}}.
- resultTree getSelection setMode: GTK.Gtk gtkSelectionBrowse.
- (model := GtkListModel on: resultTree getModel)
- contentsBlock: [ :each | {each asString} ].
- ^ GTK.GtkScrolledWindow withChild: resultTree
+ self widget: (List column: {{GtkColumnTextType title: 'Methods and Classes'}} contents: [ :each | {each asString} ]).
+ widget singleSelection.
]
whenSelectionChangedSend: aSelector to: anObject [
- resultTree getSelection
- connectSignal: 'changed' to: anObject selector: aSelector
+ widget whenSelectionChangedSend: aSelector to: anObject
]
clear [
- model clear
+ widget clear
]
hasSelectedResult [
- ^ resultTree hasSelectedItem
+ ^ widget hasSelection
]
selectedResult [
self hasSelectedResult ifFalse: [ ^ self error: 'nothing is selected' ].
- ^ resultTree selection
+ ^ widget selection
]
appendResults: aDictionary [
diff --git a/packages/visualgst/Implementors/GtkImplementorResultsWidget.st b/packages/visualgst/Implementors/GtkImplementorResultsWidget.st
index dfc3883..8f1cd39 100644
--- a/packages/visualgst/Implementors/GtkImplementorResultsWidget.st
+++ b/packages/visualgst/Implementors/GtkImplementorResultsWidget.st
@@ -38,16 +38,16 @@ GtkImageResultsWidget subclass: GtkImplementorResultsWidget [
buildTreeView [
- | widget |
- widget := super buildTreeView.
- model contentsBlock: [ :each | {each key asString} ].
- ^ widget
+ super buildTreeView.
+ widget contents: [ :each | {each key asString} ].
]
appendImplementorResults: aDictionary [
self clear.
- aDictionary associationsDo: [ :each | model append: each ]
+ widget
+ item: aDictionary associations;
+ refresh
]
selectedResult: aBrowser [
@@ -55,6 +55,5 @@ GtkImageResultsWidget subclass: GtkImplementorResultsWidget [
self hasSelectedResult ifFalse: [ ^ self ].
self selectedResult value updateBrowser: aBrowser
]
-
]
diff --git a/packages/visualgst/Implementors/GtkSenderResultsWidget.st b/packages/visualgst/Implementors/GtkSenderResultsWidget.st
index 41d817f..b081c96 100644
--- a/packages/visualgst/Implementors/GtkSenderResultsWidget.st
+++ b/packages/visualgst/Implementors/GtkSenderResultsWidget.st
@@ -55,10 +55,8 @@ GtkImageResultsWidget subclass: GtkSenderResultsWidget [
buildTreeView [
- | widget |
- widget := super buildTreeView.
- model contentsBlock: [ :each | {each displayString} ].
- ^ widget
+ super buildTreeView.
+ widget contents: [ :each | {each displayString} ].
]
appendSenderResults: aDictionary [
@@ -77,8 +75,9 @@ GtkImageResultsWidget subclass: GtkSenderResultsWidget [
findInMethod: anObject [
- (self literalsAndSpecialSelectors at: anObject displaySymbol ifAbsent: [ #() ] ) do: [ :each |
- model append: each ].
+ widget
+ item: (self literalsAndSpecialSelectors at: anObject displaySymbol ifAbsent: [ #() ] ) asArray;
+ refresh
]
selectedResult: aBrowser [
diff --git a/packages/visualgst/Inspector/GtkCharacterInspectorView.st b/packages/visualgst/Inspector/GtkCharacterInspectorView.st
deleted file mode 100644
index cc313e9..0000000
--- a/packages/visualgst/Inspector/GtkCharacterInspectorView.st
+++ /dev/null
@@ -1,62 +0,0 @@
-"======================================================================
-|
-| GtkCharacterInspectorView class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio ,
-|
-|
-| This file is part of VisualGST.
-|
-| 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.
-|
-======================================================================"
-
-GtkObjectInspectorView subclass: GtkCharacterInspectorView [
-
- do: aBlock [
- super do: aBlock.
- #('hexadecimal' 'octal' 'binary') do: aBlock
- ]
-
- selectedValue: aString [
-
-
- | base |
- base := 0.
- aString = 'hexadecimal' ifTrue: [ base := 16 ].
- aString = 'octal' ifTrue: [ base := 8 ].
- aString = 'binary' ifTrue: [ base := 2 ].
- ^ base = 0
- ifTrue: [ super selectedValue: aString ]
- ifFalse: [ self object asInteger printString: base ]
- ]
-
- canDive [
-
-
- ^ false
- ]
-]
-
diff --git a/packages/visualgst/Inspector/GtkCompiledBlockInspectorView.st b/packages/visualgst/Inspector/GtkCompiledBlockInspectorView.st
deleted file mode 100644
index 2cee85c..0000000
--- a/packages/visualgst/Inspector/GtkCompiledBlockInspectorView.st
+++ /dev/null
@@ -1,124 +0,0 @@
-"======================================================================
-|
-| GtkCompiledBlockINspectorView class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio ,
-|
-|
-| This file is part of VisualGST.
-|
-| 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.
-|
-======================================================================"
-
-GtkObjectInspectorView subclass: GtkCompiledBlockInspectorView [
-
- GtkCompiledBlockInspectorView class [ | fields | ]
-
- GtkCompiledBlockInspectorView class >> fields [
-
-
- ^ fields ifNil: [ fields := Dictionary from: {'clean-ness flags'->#flags.
- 'Number Of Arguments'->#arguments.
- 'Number Of Temporaries'->#temporaries.
- 'Number Of Literals'->#numLiterals.
- 'Needed Stack Slots'->#stack.
- 'Byte Codes'->#byte.
- 'Source Code'->#source} ]
- ]
-
- do: aBlock [
-
-
- super do: aBlock.
- self class fields keys do: aBlock
- ]
-
- selectedValue: anObject [
-