QPasteWnd.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. #if !defined(AFX_QPASTEWND_H__65261F0F_FEFD_48CF_A0CD_01D8BFEB353B__INCLUDED_)
  2. #define AFX_QPASTEWND_H__65261F0F_FEFD_48CF_A0CD_01D8BFEB353B__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // QPasteWnd.h : header file
  7. //
  8. #include "QListCtrl.h"
  9. #include "ComboBoxSearch.h"
  10. #include "WndEx.h"
  11. #include "GroupStatic.h"
  12. #include "GroupTree.h"
  13. #ifdef AFTER_98
  14. #include "AlphaBlend.h"
  15. #endif
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CQPasteWnd window
  18. class CQPasteWnd : public CWndEx
  19. {
  20. // Construction
  21. public:
  22. CQPasteWnd();
  23. // Attributes
  24. public:
  25. // Operations
  26. public:
  27. // Overrides
  28. // ClassWizard generated virtual function overrides
  29. //{{AFX_VIRTUAL(CQPasteWnd)
  30. public:
  31. virtual BOOL Create(const POINT& ptStart, CWnd* pParentWnd);
  32. virtual BOOL PreTranslateMessage(MSG* pMsg);
  33. protected:
  34. //}}AFX_VIRTUAL
  35. // Implementation
  36. public:
  37. bool Add(const CString &csHeader, const CString &csText, int nID);
  38. virtual ~CQPasteWnd();
  39. //protected:
  40. CQListCtrl m_lstHeader;
  41. #ifdef AFTER_98
  42. CAlphaBlend m_Alpha;
  43. #endif
  44. CFont m_TitleFont;
  45. CComboBoxSearch m_cbSearch;
  46. CFont m_SearchFont;
  47. CButton m_btCancel;
  48. bool m_bHideWnd;
  49. CMainTable m_Recset;
  50. CString m_strSQLSearch;
  51. CGroupStatic m_stGroup;
  52. CFont GroupFont;
  53. CString m_Title;
  54. CGroupTree m_GroupTree;
  55. CBitmapButton m_ShowGroupsFolderBottom;
  56. CBitmapButton m_ShowGroupsFolderTop;
  57. CBitmapButton m_BackButton;
  58. bool m_bAllowRepaintImmediately;
  59. void RefreshNc( bool bRepaintImmediately = false );
  60. void UpdateStatus( bool bRepaintImmediately = false ); // regenerates the status (caption) text
  61. BOOL FillList(CString csSQLSearch = "");
  62. BOOL HideQPasteWindow();
  63. BOOL ShowQPasteWindow(BOOL bFillList = TRUE);
  64. void MoveControls();
  65. void DeleteSelectedRows();
  66. BOOL OpenID( long lID );
  67. BOOL OpenSelection();
  68. BOOL OpenIndex( long nItem );
  69. BOOL NewGroup( bool bGroupSelection = true );
  70. // moves the caret to the given ID, selects it, and ensures it is visible.
  71. BOOL SetListID( long lID );
  72. CString LoadDescription( int nItem );
  73. bool SaveDescription( int nItem, CString text );
  74. //Menu Items
  75. void SetLinesPerRow(long lLines);
  76. void SetTransparency(long lPercent);
  77. void OnUpdateLinesPerRow(CCmdUI* pCmdUI, int nValue);
  78. void OnUpdateTransparency(CCmdUI* pCmdUI, int nValue);
  79. void SetMenuChecks(CMenu *pMenu);
  80. // Generated message map functions
  81. protected:
  82. //{{AFX_MSG(CQPasteWnd)
  83. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  84. afx_msg void OnSize(UINT nType, int cx, int cy);
  85. afx_msg void OnSetFocus(CWnd* pOldWnd);
  86. afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
  87. afx_msg void OnMenuLinesperrow1();
  88. afx_msg void OnMenuLinesperrow2();
  89. afx_msg void OnMenuLinesperrow3();
  90. afx_msg void OnMenuLinesperrow4();
  91. afx_msg void OnMenuLinesperrow5();
  92. afx_msg void OnMenuTransparency10();
  93. afx_msg void OnMenuTransparency15();
  94. afx_msg void OnMenuTransparency20();
  95. afx_msg void OnMenuTransparency25();
  96. afx_msg void OnMenuTransparency30();
  97. afx_msg void OnMenuTransparency40();
  98. afx_msg void OnMenuTransparency5();
  99. afx_msg void OnMenuTransparencyNone();
  100. afx_msg void OnRclickQuickPaste(NMHDR* pNMHDR, LRESULT* pResult);
  101. afx_msg void OnMenuDelete();
  102. afx_msg void OnMenuPositioningAtcaret();
  103. afx_msg void OnMenuPositioningAtcursor();
  104. afx_msg void OnMenuPositioningAtpreviousposition();
  105. afx_msg void OnMenuOptions();
  106. afx_msg void OnCancelFilter();
  107. afx_msg void OnMenuExitprogram();
  108. afx_msg void OnMenuReconnecttoclipboardchain();
  109. afx_msg void OnMenuProperties();
  110. afx_msg void OnClose();
  111. afx_msg void OnBegindrag(NMHDR* pNMHDR, LRESULT* pResult);
  112. afx_msg void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  113. afx_msg void GetDispInfo(NMHDR* pNMHDR, LRESULT* pResult);
  114. afx_msg void OnFindItem(NMHDR* pNMHDR, LRESULT* pResult);
  115. afx_msg void OnMenuFirsttenhotkeysUsectrlnum();
  116. afx_msg void OnMenuFirsttenhotkeysShowhotkeytext();
  117. afx_msg void OnMenuQuickoptionsAllwaysshowdescription();
  118. afx_msg void OnMenuQuickoptionsDoubleclickingoncaptionTogglesalwaysontop();
  119. afx_msg void OnMenuQuickoptionsDoubleclickingoncaptionRollupwindow();
  120. afx_msg void OnMenuQuickoptionsDoubleclickingoncaptionTogglesshowdescription();
  121. afx_msg void OnMenuQuickoptionsPromptfornewgroupnames();
  122. afx_msg void OnShowGroupsBottom();
  123. afx_msg void OnShowGroupsTop();
  124. afx_msg void OnMenuViewgroups();
  125. afx_msg void OnMenuQuickpropertiesSettoneverautodelete();
  126. afx_msg void OnMenuQuickpropertiesAutodelete();
  127. afx_msg void OnMenuQuickpropertiesRemovehotkey();
  128. afx_msg void OnUpdateMenuGroupsMovetothegroupBlank(CCmdUI* pCmdUI);
  129. //}}AFX_MSG
  130. afx_msg LRESULT OnListSelect(WPARAM wParam, LPARAM lParam);
  131. afx_msg LRESULT OnListEnd(WPARAM wParam, LPARAM lParam);
  132. afx_msg LRESULT OnSearch(WPARAM wParam, LPARAM lParam);
  133. afx_msg LRESULT OnDelete(WPARAM wParam, LPARAM lParam);
  134. afx_msg LRESULT OnProperties(WPARAM wParam, LPARAM lParam);
  135. afx_msg void OnGetToolTipText(NMHDR* pNMHDR, LRESULT* pResult);
  136. afx_msg LRESULT OnListSelect_DB_ID(WPARAM wParam, LPARAM lParam);
  137. afx_msg LRESULT OnListSelect_Index(WPARAM wParam, LPARAM lParam);
  138. afx_msg LRESULT OnRefreshView(WPARAM wParam, LPARAM lParam);
  139. afx_msg LRESULT OnGroupTreeMessage(WPARAM wParam, LPARAM lParam);
  140. DECLARE_MESSAGE_MAP()
  141. public:
  142. afx_msg void OnNcLButtonDblClk(UINT nHitTest, CPoint point);
  143. afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
  144. afx_msg void OnViewcaptionbaronRight();
  145. afx_msg void OnViewcaptionbaronBottom();
  146. afx_msg void OnViewcaptionbaronLeft();
  147. afx_msg void OnViewcaptionbaronTop();
  148. afx_msg void OnMenuAutohide();
  149. afx_msg void OnMenuViewfulldescription();
  150. afx_msg void OnMenuAllwaysontop();
  151. afx_msg void OnSortAscending();
  152. afx_msg void OnSortDescending();
  153. afx_msg void OnMenuNewGroup();
  154. afx_msg void OnMenuNewGroupSelection();
  155. afx_msg void OnBackButton();
  156. };
  157. /////////////////////////////////////////////////////////////////////////////
  158. //{{AFX_INSERT_LOCATION}}
  159. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  160. #endif // !defined(AFX_QPASTEWND_H__65261F0F_FEFD_48CF_A0CD_01D8BFEB353B__INCLUDED_)