Solidgraph.h
上传用户:kairuinn
上传日期:2009-02-07
资源大小:2922k
文件大小:2k
- // Solidgraph.h : main header file for the Solidgraph application
- //
- #pragma once
- #ifndef __AFXWIN_H__
- #error include 'stdafx.h' before including this file for PCH
- #endif
- #include "resource.h" // main symbols
- // CSolidgraphApp:
- // See Solidgraph.cpp for the implementation of this class
- //
- #include "ReportEditor/DiagramEditor/DiagramClipboardHandler.h"
- #include "PluginsClasses//PluginLoader.h"
- #include "Dialogs//SceneTreeDlg.h"
- #include "Tools//RegManager.h"
- class CSolidgraphApp : public CWinApp,
- public ICoreAppInterface
- {
- public:
- CSolidgraphApp();
- ~CSolidgraphApp();
- CGlobalTree* m_main_tree_control;
- CPluginLoader* m_main_pluginer;
- CRegisterManager* m_reg_manager;
- // Overrides
- public:
- virtual IProgresser* GetProgresser();
- virtual ISceneTreeControl* GetSceneTreeControl();
- CDiagramClipboardHandler m_clip;
- virtual BOOL InitInstance();
- private:
- std::vector<CString> m_FontsPathsArray;
- CString m_application_Path;
- void GetFontFiles(CString sPath);
- // Implementation
- afx_msg void OnAppAbout();
- DECLARE_MESSAGE_MAP()
- virtual int ExitInstance();
- virtual BOOL PreTranslateMessage(MSG* pMsg);
- public:
- void GetAppPath(CString& aa) {aa=m_application_Path;};
- };
- extern CSolidgraphApp theApp;
- extern ICommander* global_commander;
- extern bool translate_messages_through_app;
- extern int group_name_index;
- class AppDllInstanceSwitcher
- {
- public:
- AppDllInstanceSwitcher()
- {
- m_hInst = AfxGetResourceHandle();
- AfxSetResourceHandle(theApp.m_hInstance);
- }
- ~AppDllInstanceSwitcher()
- {
- AfxSetResourceHandle(m_hInst);
- }
- private:
- HINSTANCE m_hInst;
- };
- #define APP_SWITCH_RESOURCE AppDllInstanceSwitcher __SwitchInstance;
- sgCObject* GetObjectTopParent(const sgCObject* ob);
- CRect FitFirstRectToSecond(CSize& fitSz, CRect& windRect);
- CString GetLeftHalfOfString(UINT nID);
- void DrawGroupFrame(CDC* pDC, const CRect& rct,
- const int leftLab, const int rightLab);