diff options
| author | George Hazan <ghazan@miranda.im> | 2021-05-13 11:40:17 +0300 |
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2021-05-13 11:40:17 +0300 |
| commit | 1aecfbf8295912ccfc26bdbd9d745aed96966e66 (patch) | |
| tree | 0032ec38ed3a3efeb0b7bd2dfb9c3c70e3c75c83 /include | |
| parent | fcd8fed654606c80c4ec8a0f6718ba62de331e95 (diff) | |
UI classes & core code cleaning:
- MS_CLIST_DELETECONTACT introduced to avoid the usage of string constants directly;
- start menu item id parameter added to Clist_GroupBuildMenu();
- CNF_MAX macro added to simplify cycles over CNF_* array;
- custom draw support for CCtrlListView & CCtrlTreeView;
- Miranda's specific WM_MEASUREITEM & WM_DRAWITEM processing in CDlgBase
Diffstat (limited to 'include')
| -rw-r--r-- | include/m_clist.h | 10 | ||||
| -rw-r--r-- | include/m_contacts.h | 1 | ||||
| -rw-r--r-- | include/m_gui.h | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/include/m_clist.h b/include/m_clist.h index 37d8520cbd..a5e61560e2 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -344,6 +344,13 @@ EXTERN_C MIR_APP_DLL(BOOL) Clist_IsDocked(void); #define MS_CLIST_SHOWHIDE "CList/ShowHide"
/////////////////////////////////////////////////////////////////////////////////////////
+// deletes a contact from contact list
+// wParam = MCONTACT - contact to be deleted
+// lParam = 0
+
+#define MS_CLIST_DELETECONTACT "CList/DeleteContactCommand"
+
+/////////////////////////////////////////////////////////////////////////////////////////
// sent when the group get modified (created, renamed or deleted)
// or contact is moving from group to group
// wParam = hContact - NULL if operation on group
@@ -435,9 +442,8 @@ EXTERN_C MIR_APP_DLL(int) Clist_GroupMoveBefore(MGROUP hGroup, MGROUP hGroupBefo // The return value must be DestroyMenu()ed when you're done with it.
// NULL will be returned if the user doesn't have any groups
// The dwItemData of every menu item is the handle to that group.
-// Menu item IDs are assigned starting at 100, in no particular order.
-EXTERN_C MIR_APP_DLL(HMENU) Clist_GroupBuildMenu(void);
+EXTERN_C MIR_APP_DLL(HMENU) Clist_GroupBuildMenu(int iStartMenuId = 100);
/////////////////////////////////////////////////////////////////////////////////////////
// gets group name for a contact
diff --git a/include/m_contacts.h b/include/m_contacts.h index b7a693b809..a83acd22c1 100644 --- a/include/m_contacts.h +++ b/include/m_contacts.h @@ -63,6 +63,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define CNF_COCOUNTRY 37 // returns company country (string)
#define CNF_COHOMEPAGE 38 // returns company homepage (string)
#define CNF_DISPLAYUID 39 // returns uniqueid to display in interface (must check type for type of return)
+#define CNF_MAX 40 // maximum number
// Special types
// Return the custom name using the name order setting
diff --git a/include/m_gui.h b/include/m_gui.h index d5fd8ebf98..8662659a7a 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -1140,6 +1140,7 @@ public: NMLVFINDITEM *nmlvfi;
NMITEMACTIVATE *nmlvia;
NMLVKEYDOWN *nmlvkey;
+ NMLVCUSTOMDRAW *nmcd;
};
};
@@ -1148,6 +1149,7 @@ public: CCallback<TEventInfo> OnBeginRDrag;
CCallback<TEventInfo> OnBeginScroll;
CCallback<TEventInfo> OnColumnClick;
+ CCallback<TEventInfo> OnCustomDraw;
CCallback<TEventInfo> OnDeleteAllItems;
CCallback<TEventInfo> OnDeleteItem;
CCallback<TEventInfo> OnClick;
@@ -1284,6 +1286,7 @@ public: NMTVKEYDOWN *nmtvkey;
NMTVDISPINFO *nmtvdi;
NMTVGETINFOTIP *nmtvit;
+ NMTVCUSTOMDRAW *nmcd;
HTREEITEM hItem; // for OnItemChanged
};
};
@@ -1291,6 +1294,7 @@ public: CCallback<TEventInfo> OnBeginDrag;
CCallback<TEventInfo> OnBeginLabelEdit;
CCallback<TEventInfo> OnBeginRDrag;
+ CCallback<TEventInfo> OnCustomDraw;
CCallback<TEventInfo> OnDeleteItem;
CCallback<TEventInfo> OnEndLabelEdit;
CCallback<TEventInfo> OnGetDispInfo;
|
