summaryrefslogtreecommitdiff
path: root/plugins/WinterSpeak/src/DialogConfigActive.h
blob: 5c65d4484067ef01b15aa79d11645d32849df0e9 (plain)
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
#pragma once
#include "mirandadialog.h"

class DialogConfigActive : public MirandaDialog
{
  public:
    //--------------------------------------------------------------------------
	// Description : Initialise
	// Parameters  : db - reference to the database to initalise and save 
    //                    control to and from
	//--------------------------------------------------------------------------
	DialogConfigActive(ConfigDatabase &db);
	virtual ~DialogConfigActive();

    //--------------------------------------------------------------------------
	// Description : process a dialog message
	// Return      : 0 - process ok
    //               1 - error
	//--------------------------------------------------------------------------
    static INT_PTR CALLBACK process(HWND window, UINT message, WPARAM wparam, LPARAM lparam);

  private:
	//--------------------------------------------------------------------------
	// Description : load/save setting to the miranda database
	//--------------------------------------------------------------------------
	void load(HWND window);
	void save(HWND window);
	void notify(HWND window, LPARAM lparam);

	//--------------------------------------------------------------------------
	// Description : select/unselect all the active status checkboxes
    // Parameters  : state - the state to apply to the checkboxes
	//--------------------------------------------------------------------------
    void selectAllUsers(HWND window, bool state);
	void ResetListOptions(HWND listview);
	void InitialiseItem(HWND hwndList, HANDLE hItem, bool message, bool status);
	void SetAllContactIcons(HWND listview);
	void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int iColumn, int iImage);
	void SetAllChildIcons(HWND hwndList, HANDLE hFirstItem, int iColumn, int iImage);
	void SetListGroupIcons(HWND hwndList, HANDLE hFirstItem, HANDLE hParentItem, int *groupChildCount);
	void SaveItemMask(HWND hwndList, MCONTACT hContact, HANDLE hItem);
    
    static DialogConfigActive *m_instance;
    ConfigDatabase            &m_db;
	HICON hIcons[4];
	HANDLE hItemUnknown;
	HANDLE hItemAll;
};