当前位置: 首页 > news >正文

SharpDevelop IDE IViewContent.cs类

文件位置:IViewContent.cs

/// <summary>/// IViewContent is the base interface for "windows" in the document area of SharpDevelop./// A view content is a view onto multiple files, or other content that opens like a document/// (e.g. the start page)./// </summary>public interface IViewContent : IDisposable, ICanBeDirty, IServiceProvider{/// <summary>/// This is the UI element for the view./// You can use both Windows.Forms and WPF controls./// </summary>object Control {get;}/// <summary>/// Gets the control which has focus initially./// </summary>object InitiallyFocusedControl {get;}/// <summary>/// The workbench window in which this view is displayed./// </summary>IWorkbenchWindow WorkbenchWindow {get;set;}/// <summary>/// Is raised when the value of the TabPageText property changes./// </summary>event EventHandler TabPageTextChanged;/// <summary>/// The text on the tab page when more than one view content/// is attached to a single window./// </summary>string TabPageText {get;}/// <summary>/// The title of the view content. This normally is the title of the primary file being edited./// </summary>string TitleName {get;}/// <summary>/// Is called each time the name for the content has changed./// </summary>event EventHandler TitleNameChanged;/// <summary>/// The tooltip that will be shown when you hover the mouse over the title/// </summary>string InfoTip {get;}/// <summary>/// Is called each time the info tip for the content has changed./// </summary>event EventHandler InfoTipChanged;/// <summary>/// Saves the content to the location <code>fileName</code>/// </summary>/// <remarks>/// When the user switches between multiple views editing the same file, a view/// change will trigger one view content to save that file into a memory stream/// and the other view content will load the file from that memory stream./// </remarks>void Save(OpenedFile file, Stream stream);/// <summary>/// Load or reload the content of the specified file from the stream./// </summary>/// <remarks>/// When the user switches between multiple views editing the same file, a view/// change will trigger one view content to save that file into a memory stream/// and the other view content will load the file from that memory stream./// </remarks>void Load(OpenedFile file, Stream stream);/// <summary>/// Gets the list of files that are being edited using this view content./// The returned collection usually is read-only./// </summary>IList<OpenedFile> Files { get; }/// <summary>/// Gets the primary file being edited. Might return null if no file is edited./// </summary>OpenedFile PrimaryFile { get; }/// <summary>/// Gets the name of the primary file being edited. Might return null if no file is edited./// </summary>FileName PrimaryFileName { get; }/// <summary>/// Builds an <see cref="INavigationPoint"/> for the current position./// </summary>INavigationPoint BuildNavPoint();bool IsDisposed { get; }event EventHandler Disposed;/// <summary>/// Gets if the view content is read-only (can be saved only when choosing another file name)./// </summary>bool IsReadOnly { get; }/// <summary>/// Gets if the view content is view-only (cannot be saved at all)./// </summary>bool IsViewOnly { get; }/// <summary>/// Gets whether this view content should be closed when the solution is closed./// </summary>bool CloseWithSolution { get; }#region Secondary view content support/// <summary>/// Gets the collection that stores the secondary view contents./// </summary>ICollection<IViewContent> SecondaryViewContents { get; }/// <summary>/// Gets switching without a Save/Load cycle for <paramref name="file"/> is supported/// when switching from this view content to <paramref name="newView"/>./// </summary>bool SupportsSwitchFromThisWithoutSaveLoad(OpenedFile file, IViewContent newView);/// <summary>/// Gets switching without a Save/Load cycle for <paramref name="file"/> is supported/// when switching from <paramref name="oldView"/> to this view content./// </summary>bool SupportsSwitchToThisWithoutSaveLoad(OpenedFile file, IViewContent oldView);/// <summary>/// Executes an action before switching from this view content to the new view content./// </summary>void SwitchFromThisWithoutSaveLoad(OpenedFile file, IViewContent newView);/// <summary>/// Executes an action before switching from the old view content to this view content./// </summary>void SwitchToThisWithoutSaveLoad(OpenedFile file, IViewContent oldView);#endregion}

IViewContent 是一个接口,定义了视图内容的基本行为和属性。在 SharpDevelop IDE 中,视图内容是文档区域中的“窗口”,可以是一个编辑器窗口,也可以是其他类型的窗口,如起始页。

以下是 IViewContent 接口的主要功能:

  1. 获取和设置视图内容的 UI 元素:通过 Control 属性,可以获取和设置视图内容的 UI 元素。这个 UI 元素可以是 Windows.Forms 控件,也可以是 WPF 控件。

  2. 获取和设置视图内容的标题:通过 TitleName 属性,可以获取和设置视图内容的标题。这个标题通常是正在编辑的主要文件的标题。

  3. 获取和设置视图内容的标签页文本:通过 TabPageText 属性,可以获取和设置视图内容的标签页文本。这个文本在多个视图内容附加到同一个窗口时使用。

  4. 保存和加载视图内容:通过 SaveLoad 方法,可以保存和加载视图内容。这些方法接受一个 OpenedFile 对象和一个 Stream 对象,用于保存和加载文件。

  5. 获取正在编辑的文件列表:通过 Files 属性,可以获取正在编辑的文件列表。这个列表通常是一个只读的集合。

  6. 获取正在编辑的主要文件:通过 PrimaryFile 属性,可以获取正在编辑的主要文件。如果没有任何文件正在编辑,这个属性可能返回 null

  7. 获取正在编辑的主要文件的名称:通过 PrimaryFileName 属性,可以获取正在编辑的主要文件的名称。如果没有任何文件正在编辑,这个属性可能返回 null

  8. 构建导航点:通过 BuildNavPoint 方法,可以构建一个导航点,用于表示当前的位置。

  9. 获取视图内容的关闭行为:通过 CloseWithSolution 属性,可以获取视图内容的关闭行为。这个属性表示当解决方案关闭时,视图内容是否应该关闭。

  10. 获取视图内容的只读和只读状态:通过 IsReadOnlyIsViewOnly 属性,可以获取视图内容的只读和只读状态。如果视图内容是只读的,那么它只能保存到另一个文件名,不能保存到原始文件。如果视图内容是只读的,那么它不能保存到任何文件。

  11. 获取和设置视图内容的上下文帮助提供者:通过 ContextHelpProvider 属性,可以获取和设置视图内容的上下文帮助提供者。上下文帮助提供者用于提供上下文相关的帮助信息。

  12. 获取和设置视图内容的工具宿主:通过 ToolsHost 属性,可以获取和设置视图内容的工具宿主。工具宿主用于显示和管理工具。

  13. 获取和设置视图内容的属性容器:通过 PropertyContainer 属性,可以获取和设置视图内容的属性容器。属性容器用于存储和显示对象的属性。

  14. 获取和设置视图内容的剪贴板处理程序:通过 ClipboardHandler 属性,可以获取和设置视图内容的剪贴板处理程序。剪贴板处理程序用于处理剪贴板操作,如复制、粘贴、剪切等。

  15. 获取和设置视图内容的撤销处理程序:通过 UndoHandler 属性,可以获取和设置视图内容的撤销处理程序。撤销处理程序用于处理撤销和重做操作。

  16. 获取和设置视图内容的文件文档提供程序:通过 FileDocumentProvider 属性,可以获取和设置视图内容的文件文档提供程序。文件文档提供程序用于提供文件文档。

  17. 获取和设置视图内容的组件变更服务:通过 ComponentChangeService 属性,可以获取和设置视图内容的组件变更服务。组件变更服务用于通知组件的变更。

  18. **获取和设置视图内容的

http://www.lryc.cn/news/499355.html

相关文章:

  • Unity RectTransUtility工具类
  • React性能优化
  • 前端开发流程实操:从概念到上线
  • Metasploit使用
  • Milvus向量数据库05-常见问题整理
  • Ruby On Rails 笔记3——表的增删改查
  • CSS3 动画详解,介绍、实现与应用场景详解
  • Winston-MySQL 使用文档
  • java日期工具: 获取两个时间段的时间段值,Java获得两个日期之间的所有年、月份、日。
  • 【Rive】混合动画
  • qt应用程序崩溃日志和转储dmp文件对于定位问题
  • Mysql架构
  • 杂发单的单据类型一个参数的逻辑
  • Linux系统 vim 编辑文件搜索关键字用法
  • Vue智慧商城项目
  • Qt Window应用程序去掉控制台窗口
  • 软件测试最新项目合集【商城、外卖、银行、金融等等.......】
  • SAP SD学习笔记18 - 投诉处理4 - 请求书订正依赖,投诉处理流程的总结
  • VBA批量提取PDF内容的程序
  • C++入门终
  • ubuntu下Qt5自动编译配置QtMqtt环境(10)
  • Vulnhub DC-3靶机攻击实战(一)
  • 常用传感器介绍合集
  • “为您的家电穿上防震铠甲:优质电器缓冲器
  • Elasticsearch入门之HTTP高级查询操作
  • Java基础-异常
  • 鲲鹏麒麟使用Docker部署Redis5
  • 家政项目小程序+ssm
  • Day7 苍穹外卖项目 缓存菜品、SpringCache框架、缓存套餐、添加购物车、查看购物车、清空购物车
  • 天天 AI-241207:今日热点- Windsurf:在工程能力上进一步进化的Cursor