zoukankan      html  css  js  c++  java
  • 基础框架平台——基础管理框架——GUI抽象设计(布局管理器)

    本接口定义布局管理器如何管理工作空间中各GUI要素的布局。比如面板的显示、隐藏状态,面板、工作台窗体(视图)的配置,活动面板,显示、隐藏面板,重绘工作台窗体和面板。

    定义属性:
     活动工作台窗体,当前活动的视图内容。

    定义方法:
     驻于内存,从内存中撤出,显示面板,使面板处于活动状态,隐藏面板,判断面板是否可见,重绘所有组件,导入配合信息,恢复配置信息,活动的工作台窗体发生变化

    定义事件:
     活动工作台窗体变化时触发的事件。

     1using System;
     2using System.Collections.Generic;
     3using System.Text;
     4
     5namespace MetaApplication
     6{
     7    /// <summary>
     8    /// The IWorkbenchLayout object is responsible for the layout of 
     9    /// the workspace, it shows the contents, chooses the IWorkbenchWindow
    10    /// implementation etc. it could be attached/detached at the runtime
    11    /// to a workbench.
    12    /// </summary>

    13    public interface IWorkbenchLayout
    14    {
    15        IWorkbenchWindow ActiveWorkbenchwindow
    16        {
    17            get;
    18        }

    19
    20        object ActiveContent
    21        {
    22            get;
    23        }

    24
    25        /// <summary>
    26        /// Attaches this layout manager to a workbench object.
    27        /// </summary>

    28        void Attach(IWorkbench workbench);
    29
    30        /// <summary>
    31        /// Detaches this layout manager from the current workspace.
    32        /// </summary>

    33        void Detach();
    34
    35        /// <summary>
    36        /// Shows a new <see cref="IPadContent"/>.
    37        /// </summary>

    38        void ShowPad(IPadContent content);
    39
    40        /// <summary>
    41        /// Activates a pad (Show only makes it visible but Activate does
    42        /// bring it to foreground)
    43        /// </summary>

    44        void ActivatePad(IPadContent content);
    45        void ActivatePad(string fullyQualifiedTypeName);
    46
    47        /// <summary>
    48        /// Hides a new <see cref="IPadContent"/>.
    49        /// </summary>

    50        void HidePad(IPadContent content);
    51
    52        /// <summary>
    53        /// returns true, if padContent is visible;
    54        /// </summary>

    55        bool IsVisible(IPadContent padContent);
    56
    57        /// <summary>
    58        /// Re-initializes all components of the layout manager.
    59        /// </summary>

    60        void RedrawAllComponents();
    61
    62        /// <summary>
    63        /// Shows a new <see cref="IViewContent"/>.
    64        /// ?????不明白干什么用的,后续会如何使用
    65        /// </summary>

    66        IWorkbenchWindow ShowView(IViewContent content);
    67
    68
    69        void LoadConfiguration();
    70        void StoreConfiguration();
    71
    72        /// <summary>
    73        /// Is called, when the workbench window which the user has into
    74        /// the foreground (e.g. editable) changed to a new one.
    75        /// </summary>

    76        event EventHandler ActiveWorkbenchWindowChanged;
    77
    78        // only needed in the workspace window when the 'secondary view content' changed
    79        // it is somewhat like 'active workbench window changed'
    80        void OnActiveWorkbenchWindowChanged(EventArgs e);
    81    }

    82}

    83
  • 相关阅读:
    110、抽象基类为什么不能创建对象?
    109、什么情况会自动生成默认构造函数?
    108、如果想将某个类用作基类,为什么该类必须定义而非声明?
    107、类如何实现只能静态分配和只能动态分配
    106、C++中的指针参数传递和引用参数传递有什么区别?底层原理你知道吗?
    hdoj--2036--改革春风吹满地(数学几何)
    nyoj--46--最少乘法次数(数学+技巧)
    vijos--P1211--生日日数(纯模拟)
    nyoj--42--一笔画问题(并查集)
    nyoj--49--开心的小明(背包)
  • 原文地址:https://www.cnblogs.com/bobzhangfw/p/632253.html
Copyright © 2011-2022 走看看