IMainFrame

Inherited from XListener,

Inherited by NULL

Friend class NULL

Description

IMainFrame是XT框架的接口类,它负责监听来自程序底层的消息并对消息作出相应的反应。它提供的接口包括:获取文档;获取命令管理器;响应应用事件;启动命令;执行命令;响应错误信息等。

Public interface


virtual XDocument * getDocument(int index) = 0

virtual XDocument * getCurrentDocument() = 0

virtual void setCurrentDocument(XDocument * doc) = 0

virtual void closeDocument(XDocument * doc, bool bCloseDocWindow = true) = 0

virtual XDocument * newDocument(const char * docType) = 0

virtual UIProxy * newInstance(const char * schemeName) = 0

virtual const char * getCurrentSchemeName() = 0

virtual const char * getClipboardText() = 0

virtual XPicker * getPicker() = 0

virtual void launchCommand(int cid,const CmdParam * param = 0) = 0

virtual void nextCommand(ulong cid = 0) = 0

virtual CommandManager * getCommandManager() = 0

virtual ICommandWindow * getCommandWindow() = 0

virtual void onApplicationEvent(EventTypeID et, XWord param = XWord()) = 0

virtual bool runGPUCalculation(const char * gcmd, const void * gin, void * gout) = 0

virtual void inform(const char * msg, bool bWarning = false) = 0

virtual void message(const char * info,…) = 0

virtual void error(ErrorCode e) = 0

virtual RunMode getRunMode() = 0

virtual int askQuestion(const char * title,const char * q, bool bEnableCancel) =0

virtual int monitorProcess(const char * exe, const char * param, const char * title = 0, bool bSilent = false, const char * workdir = 0) = 0

virtual int startThread(const char * name, ThreadFunc func,XWord param, bool bAsync) = 0

virtual void quitThread(const char * name) = 0

virtual bool isThreadRunning(const char * name) = 0

virtual int startThreadProcess(ThreadData * tdata, const char * exe, LabelVarSection * param, ProcessOutputFunc outputFunc) = 0

virtual void notifyThreadEvent(ThreadData * tdata, EventTypeID et, XWord param = XWord(), bool bFlushImmediatly = false) = 0

virtual void flushThreadEvents(ThreadData * tdata) = 0

virtual void setPickType(TypeID type) = 0

virtual bool isDockVisible(TypeID dock) = 0

virtual void loadModule(const char * modules) = 0

virtual ErrorCode executeScript(const char * script,const char * param, bool bCheckParam = false) = 0

virtual bool executeCommand(ICommand * cmd) = 0

virtual ErrorCode executeBatch(const char * batch_file) = 0

virtual void updateAction(ulong cid, bool bUpdateGroup = false, bool bUpdateEnable = false) = 0

virtual void setActionEnable(ulong cid, bool bEnable) = 0

virtual void refreshView() = 0

virtual void previewDialog(const char * xml) = 0

virtual void updateTreeView(TreeNode * tItem, bool bRecursive = true) = 0