diff options
author | George Hazan <ghazan@miranda.im> | 2021-05-08 18:18:34 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-05-10 19:45:55 +0300 |
commit | 0943ae89e869ded753e5fbc5b64dca458a8f31b8 (patch) | |
tree | 7a661c8402302df8a4eb2d20b97218e346d896c9 /include/m_gui.h | |
parent | acd0d6c62891a2e3fa0bf94b66b93e65e5922e24 (diff) |
CCtrlListView::MoveItem, CCtrlListView::SetCurSel, CCtrlCombo::SelectData - new useful methods
(cherry picked from commit 9661e86b4d2e1280b6e5e562ffafb46d1b6c0817)
Diffstat (limited to 'include/m_gui.h')
-rw-r--r-- | include/m_gui.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/m_gui.h b/include/m_gui.h index 152abae62c..25bd775638 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -949,6 +949,9 @@ public: bool OnApply() override;
void OnReset() override;
+ // selects line with userdata passed. returns index of this line or -1
+ int SelectData(LPARAM data);
+
// Control interface
int AddString(const wchar_t *text, LPARAM data = 0);
int AddStringA(const char *text, LPARAM data = 0);
@@ -985,6 +988,11 @@ class MIR_CORE_EXPORT CCtrlListView : public CCtrlBase public:
CCtrlListView(CDlgBase *dlg, int ctrlId);
+ // direction = -1 or 1. returns new item index
+ int MoveItem(int idx, int direction);
+
+ void SetCurSel(int idx);
+
// Classic LV interface
DWORD ApproximateViewRect(int cx, int cy, int iCount);
void Arrange(UINT code);
|