-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBottomFrame.h
More file actions
110 lines (89 loc) · 3.45 KB
/
Copy pathBottomFrame.h
File metadata and controls
110 lines (89 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// BottomFrame.h: interface for the CBottomFrame class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_BOTTOMFRAME_H__F922AD96_304F_11DA_A17D_000103DD18CD__INCLUDED_)
#define AFX_BOTTOMFRAME_H__F922AD96_304F_11DA_A17D_000103DD18CD__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "viksoe\colorcombo.h"
#include "viksoe\fontcombo.h"
#include "iinputframe.h"
class CInputView1;
struct IMainFrame;
struct CInputParams;
#define CHAIN_TAB_CHILD_COMMANDS()\
if(uMsg == WM_COMMAND){\
TTabCtrl &tc = GetTabCtrl();\
int index = tc.GetCurSel();\
if(index >= 0){\
TTabCtrl::TItem *p = tc.GetItem((size_t)index);\
if(p && p->UsingTabView()){\
CWindow wnd = p->GetTabView();\
wnd.SendMessage(uMsg,wParam,lParam);\
}\
}\
}\
typedef CDotNetTabCtrl<CTabViewTabItem> BottomTabCtrl;
class CBottomFrame: \
public CFrameWindowImpl<CBottomFrame>,
public IInputFrame,
public CMessageFilter
{
typedef CFrameWindowImpl<CBottomFrame> _BaseClass;
public:
CBottomFrame(IMainFrame *pFrame);
virtual ~CBottomFrame();
DECLARE_FRAME_WND_CLASS("No5BottomFrame", IDR_BOTTOMFRAME)
BEGIN_MSG_MAP(CBottomFrame)
MESSAGE_HANDLER(WM_CREATE,OnCreate)
MESSAGE_HANDLER(WM_DESTROY,OnDestroy)
MESSAGE_HANDLER(NO5WM_SMILESWND,OnSmileWndClose)
COMMAND_ID_HANDLER(ID_EDIT_FADE,OnEditFade)
COMMAND_ID_HANDLER(ID_EDIT_BLEND,OnEditBlend)
COMMAND_CODE_HANDLER(CBN_SELENDOK,OnComboSelChange)
COMMAND_ID_HANDLER(ID_BOTTOM_SMILES,OnSmiles)
//CHAIN_TAB_CHILD_COMMANDS()
CHAIN_CLIENT_COMMANDS()
CHAIN_MSG_MAP(_BaseClass)
REFLECT_NOTIFICATIONS()
END_MSG_MAP()
virtual BOOL PreTranslateMessage(MSG* pMsg)
{
if(m_hAccel != NULL && TranslateAccelerator(m_hWnd,m_hAccel,pMsg))
return TRUE;
return FALSE;
}
// Handler prototypes (uncomment arguments if needed):
// LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
// LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
// LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
LRESULT OnCreate(UINT /*uMsg*/,WPARAM wParam,LPARAM lParam,BOOL &bHandled);
LRESULT OnDestroy(UINT /*uMsg*/,WPARAM wParam,LPARAM lParam,BOOL &bHandled);
LRESULT OnSmileWndClose(UINT /*uMsg*/,WPARAM wParam,LPARAM lParam,BOOL &bHandled);
LRESULT OnEditFade(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& bHandled);
LRESULT OnEditBlend(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& bHandled);
LRESULT OnSmiles(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& bHandled);
LRESULT OnComboSelChange(WORD /*wNotifyCode*/, WORD wID, HWND hWndCtl, BOOL& bHandled);
// IInputFrame methods
virtual void SetParams(CInputParams &p);
virtual void GetParams(CInputParams &p);
virtual CToolBarCtrl & GetFontToolbar(void);
virtual void SetColorsetName(LPCTSTR name,BOOL bNotifySink);
virtual CString GetColorsetName(void);
virtual void SetSink(IInputFrameEvents *pSink);
//
int GetDesiredHeight(void);
private:
CInputView1 *m_view1;
IMainFrame *m_pFrame;
CToolBarCtrl m_tb;
CColorPickerComboCtrl m_cbColors;
CFontPickerComboCtrl m_cbFonts;
CComboBox m_cbSize;
CComboBox m_cbFade;
IInputFrameEvents *m_pSink;
void ReloadFadeCombo(void);
friend CInputView1;
};
#endif // !defined(AFX_BOTTOMFRAME_H__F922AD96_304F_11DA_A17D_000103DD18CD__INCLUDED_)