summaryrefslogtreecommitdiff
path: root/plugins/PasteIt/Options.h
blob: 9e58e44d7ff4b13b61caa5dd413e69644a66e913 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
Paste It plugin
Copyright (C) 2011 Krzysztof Kral

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once
#include "PasteToWeb.h"

class WebOptions
{
public:
	WebOptions(int serv);
	virtual ~WebOptions();
	virtual WebOptions* Copy();
	int server;
	bool isSendFileName;
	bool isPublicPaste;
	bool isCombo1;
	std::list<PasteFormat> combo1Values;
	std::wstring combo1Desc;
	bool isPastebin;

	std::list<PasteFormat> formats;
	std::wstring defFormatId;
	bool sendFileName;
	bool publicPaste;
	std::wstring combo1;
	std::wstring pastebinUserKey;
};

class Options
{
public:
	Options();
	~Options();
	static int InitOptions(WPARAM wParam, LPARAM lParam);

	static INT_PTR CALLBACK DlgProcOptsMain(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
	static INT_PTR CALLBACK DlgProcOptsPages(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
	static INT_PTR CALLBACK DlgProcOptsConfigure(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
	static INT_PTR CALLBACK DlgProcOptsLogin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);

	static void InitCodepageCB(HWND hwndCB, unsigned int codepage);
	static void SetCodepageCB(HWND hwndCB, unsigned int codepage);
	static unsigned int GetCodepageCB(HWND hwndCB, bool errorReport, unsigned int defCp);

	static Options *instance;
	void Save();
	void Load();

	int defWeb;
	unsigned int codepage;
	bool autoUTF;
	bool confDlg;
	bool autoSend;
	void SetDefWeb(int web);
	WebOptions* webOptions[PasteToWeb::pages];
};