July 29th Wednesday (七月 二十九日 水曜日)

来源:互联网 发布:node.js react区别 编辑:程序博客网 时间:2024/05/17 03:26

wxView

  The wxView class can be used to model the viewing and editing component of an application's file-based data. It is part of the document/view
framework supported by wxWidgets, and cooperates with the wxDocument, wxDocTemplate and wxDocManager classes.

  To use the abstract wxView class, you need to derive a new class and override at least the member functions OnCreate, OnDraw, OnUpdate and OnClose.
You will probably want to respond to menu commands from the frame containing the view.

  Use the macros DECLARE_DYNAMIC_CLASS and IMPLEMENT_DYNAMIC_CLASS in order to allow the framework to create view objects on demand. When you
create a wxDocTemplate object on application initialization, you should pass CLASSINFO(YourViewClass) to the wxDocTemplate constructor so that
it knows how to create an instance of this class.

  If you do not wish to use the wxWidgets method of creating view objects dynamically, you must override wxDocTemplate::CreateView to return
an instance of the appropriate class.