• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

FreeTrainの進化系を目指す


Commit MetaInfo

Revision44 (tree)
Time2016-05-15 23:42:16
Authorc477

Log Message

toolWindowsManager の追加

Change Summary

Incremental Difference

--- trunk/framework/ui/mainframe/IBarHostFrame.cs (revision 43)
+++ trunk/framework/ui/mainframe/IBarHostFrame.cs (revision 44)
@@ -69,5 +69,7 @@
6969 Form[] MdiChildren{get;}
7070
7171 void SetStatusText(string txt);
72+
73+ IToolWindowsManager ToolWindows { get; }
7274 }
7375 }
--- trunk/framework/ui/mainframe/IToolWindowsManager.cs (nonexistent)
+++ trunk/framework/ui/mainframe/IToolWindowsManager.cs (revision 44)
@@ -0,0 +1,54 @@
1+using nft.framework.plugin;
2+using System;
3+using System.Collections.Generic;
4+using System.Text;
5+
6+namespace nft.ui.mainframe {
7+
8+ public interface IToolWindowsManager {
9+ void RegisterFactiory(string name, object factory);
10+
11+ IToolWindow GetOrCreate(string name);
12+
13+ event EventHandler<ToolWindowActivateEventArgs> ToolWindowActivate;
14+
15+ IToolWindow ActiveTool { get; }
16+ }
17+
18+ public class ToolWindowActivateEventArgs : EventArgs {
19+ readonly IToolWindowsManager source;
20+ readonly String name;
21+
22+ public ToolWindowActivateEventArgs(IToolWindowsManager manager, string activatedName) {
23+ this.source = manager;
24+ this.name = activatedName;
25+ }
26+
27+ public IToolWindowsManager Soruce {
28+ get { return source; }
29+ }
30+
31+ public string ActivatedWindowName {
32+ get { return name; }
33+ }
34+
35+ }
36+
37+
38+ public class DefaultToolWindowsManager: IToolWindowsManager {
39+
40+ public void RegisterFactiory(string name, object factory) {
41+ throw new NotImplementedException();
42+ }
43+
44+ public IToolWindow GetOrCreate(string name) {
45+ throw new NotImplementedException();
46+ }
47+
48+ public event EventHandler<ToolWindowActivateEventArgs> ToolWindowActivate;
49+
50+ public IToolWindow ActiveTool {
51+ get { throw new NotImplementedException(); }
52+ }
53+ }
54+}
--- trunk/framework/ui/mainframe/IToolWindow.cs (nonexistent)
+++ trunk/framework/ui/mainframe/IToolWindow.cs (revision 44)
@@ -0,0 +1,21 @@
1+using System;
2+using System.Collections.Generic;
3+using System.Drawing;
4+using System.Text;
5+
6+namespace nft.ui.mainframe {
7+ public interface IToolWindow {
8+ void Activate();
9+ bool IsActive();
10+ void TryClose();
11+ bool Visible { get; }
12+ bool Docking { get; }
13+ Size ClientAreaSize { get; }
14+ Object UIObject { get; }
15+ Object Controller { get; set; } // TODO define controller interface
16+ }
17+
18+ public class WinFormToolWindow {
19+
20+ }
21+}
--- trunk/framework/ui/mainframe/MainFrame.cs (revision 43)
+++ trunk/framework/ui/mainframe/MainFrame.cs (revision 44)
@@ -32,6 +32,7 @@
3232 private DockPanel panelCenter;
3333 private ToolStripStatusLabel messageLabel;
3434 private MenuStrip mainMenu;
35+ private IToolWindowsManager toolWindowsManager;
3536
3637 public event EventHandler<EventArgs> ActiveViewChanged;
3738 public event EventHandler<EventArgs> ActiveSubformChanged;
@@ -45,6 +46,7 @@
4546 //IsMdiContainer = true;
4647 dockManager = new DockingManagerEx(panelCenter);
4748 stripManager = new ToolStripManager(toolStripPanel, mainMenu);
49+ toolWindowsManager = new DefaultToolWindowsManager();
4850 KeyPreview = true;
4951 PreviewKeyDown += new PreviewKeyDownEventHandler(MainFrame_PreviewKeyDown);
5052 /*