3 #include "controllers/ScopeLogger.h"
4 #include "MainDlgView.h"
5 #include "ThirdParty/ToolbarHelper.h"
10 class ScopeController;
17 typedef CWinTraits<WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, WS_EX_APPWINDOW | WS_EX_WINDOWEDGE>
CMainDlgFrameTraits;
21 public CAeroImpl<CMainDlgFrame>,
22 public CFrameWindowImpl<CMainDlgFrame, CWindow, CMainDlgFrameTraits>,
23 public CUpdateUI<CMainDlgFrame>,
24 public CToolBarHelper<CMainDlgFrame>,
26 public CMessageFilter {
77 DECLARE_FRAME_WND_CLASS(NULL, IDR_MAINFRAME)
80 UPDATE_ELEMENT(ID_TOOLS_SHUTTEROPEN, UPDUI_MENUPOPUP)
81 UPDATE_ELEMENT(0, UPDUI_STATUSBAR)
82 UPDATE_ELEMENT(1, UPDUI_STATUSBAR)
83 UPDATE_ELEMENT(2, UPDUI_STATUSBAR)
113 CHAIN_MSG_MAP(CMainDlgFrameType)
114 CHAIN_CLIENT_COMMANDS()
118 void OnToolBarCombo(HWND hWndCombo, UINT nID,
int nSel, LPCTSTR lpszText, DWORD_PTR dwItemData) {}
123 virtual BOOL PreTranslateMessage(MSG* pMsg);
129 void OnTimer(UINT_PTR nIDEvent);
132 LRESULT
OnCreate(LPCREATESTRUCT lParam);
144 LRESULT
OnFileExit(WORD , WORD , HWND , BOOL& );
174 LRESULT
OnAppAbout(WORD , WORD , HWND , BOOL& );
Main controller of microscope hardware and acquisition, also interface to the GUI.
void OnPaint(CDCHandle dc)
Recreates stored frames on first call.
LRESULT OnSaveWindowPositions(WORD, WORD, HWND, BOOL &)
Calls ScopeController::SaveCurrentWindowPositions.
LRESULT OnSaveDefaultParameters(WORD, WORD, HWND, BOOL &)
Opens dialog to save the default ScopeParameters.
LRESULT OnCreate(LPCREATESTRUCT lParam)
Creates the frame with all its stuff and the CMainDialogView inside.
LRESULT OnOpenLogbook(WORD, WORD, HWND, BOOL &)
Opens the LogFrame window.
LRESULT OnZeroGalvoOutputs(WORD, WORD, HWND, BOOL &)
Calls ScopeController::ZeroGalvoOutputs.
The main application dialog frame.
View class of the main dialog.
LRESULT OnLoadParameters(WORD, WORD, HWND, BOOL &)
Opens dialog to load ScopeParameters.
CWinTraits< WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, WS_EX_APPWINDOW|WS_EX_WINDOWEDGE > CMainDlgFrameTraits
Traits for this window are standard CFrameWinTraits but without WS_THICKFRAME => no resize possible...
void NewLogFrame(const RECT &_rect)
Opens a CLogFrame.
A logger class to log various messages and user comments.
LRESULT OnFileExit(WORD, WORD, HWND, BOOL &)
Calls QuitApplication.
CMainDlgView m_dlgView
the view with the dialog controls
void QuitApplication()
Calls ScopeController::PrepareQuit and sends close message and subsequently quits the whole applicati...
LRESULT OnShutterOpen(WORD, WORD, HWND, BOOL &)
Calls ScopeController::OpenShutter.
scope::ScopeLogger scope_logger
our ScopeLogger here
scope::ScopeController scope_controller
our ScopeController here
void RecreateWindows()
Opens windows as saved.
void NewChannelFrame(const uint32_t &_area, const RECT &_rect)
Opens a new CChannelFrame.
LRESULT OnSaveParameters(WORD, WORD, HWND, BOOL &)
Opens dialog to save ScopeParameters.
static std::array< UINT, 4 > histogramareas_ids
ids for the new histogram toolbar dropdown menu items.
CCommandBarCtrl m_CmdBar
the command bar.
LRESULT OnAppAbout(WORD, WORD, HWND, BOOL &)
Opens the about dialog.
bool firstpaint
to recreate stored windows
BOOL OnForwardMsg(LPMSG Msg, DWORD nUserData)
Forwards to the view.
LRESULT OnNewHistogramFrame(WORD, WORD, HWND, BOOL &)
Opens a new CHistogramFrame, determines which dropdown menu item/area was choosen.
virtual void PrepareToolBarMenu(UINT nMenuID, HMENU hMenu)
Used in CToolBarHelper to fill the dropdown menus.
void NewHistogramFrame(const uint32_t &_area, const RECT &_rect)
Opens a new CHistogramFrame.
void OnTimer(UINT_PTR nIDEvent)
Update the memory consumption display.
LRESULT OnNewChannelFrame(WORD, WORD, HWND, BOOL &)
Opens a new CChannelFrame, determines which dropdown menu item/area was choosen.
CMultiPaneStatusBarCtrl m_wndStatusBar
the status bar
void OnDestroy()
Destroys view and removes message stuff.
CFrameWindowImpl< CMainDlgFrame, CWindow, CMainDlgFrameTraits > CMainDlgFrameType
Need to typedef this, otherwise problems with CHAIN_MSG_MAP macro...
static std::array< UINT, 4 > viewareas_ids
ids for the new view toolbar dropdown menu items.