File: htpal.h

package info (click to toggle)
ht 2.0.20-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,324 kB
  • sloc: cpp: 97,563; ansic: 17,183; sh: 3,811; lex: 226; makefile: 213; yacc: 127
file content (133 lines) | stat: -rw-r--r-- 3,536 bytes parent folder | download | duplicates (8)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/* 
 *	HT Editor
 *	htpal.h
 *
 *	Copyright (C) 1999-2002 Stefan Weyergraf
 *
 *	This program is free software; you can redistribute it and/or modify
 *	it under the terms of the GNU General Public License version 2 as
 *	published by the Free Software Foundation.
 *
 *	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, write to the Free Software
 *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef __HTPAL_H__
#define __HTPAL_H__

#include "data.h"
#include "htobj.h"
#include "htreg.h"

#define rnt_palette_name		"palette"

struct defpal {
	int idx;
	const char *name;
	int color;
};

/*
 *	CLASS palette_entry
 */

class palette_entry: public ht_registry_data {
public:
	uint idx;
	vcp color;

		palette_entry(uint idx=0, vcp color=0);
		palette_entry(BuildCtorArg&a): ht_registry_data(a) {};
/* overwritten */
	virtual	bool editdialog(const char *keyname);
	virtual void strvalue(char *buf32bytes);
	virtual	void load(ObjectStream &f);
	virtual	ObjectID getObjectID() const;
	virtual	void store(ObjectStream &f) const;
};

/*
 *	palette_key
 */

#define palettekey "palette"

/*
 *   palette class keys
 */

#define palclasskey_generic					"generic"
#define palclasskey_tags	     				"tags"
#define palclasskey_syntax	     				"syntax"

/*
 *	generic palette
 */

#define palkey_generic_window_default				"window"
#define palkey_generic_dialog_default				"dialog"
#define palkey_generic_menu_default				"menu"
#define palkey_generic_keys_default				"keyline"
#define palkey_generic_desktop_default				"desktop"
#define palkey_generic_help_default				"help"

#define palkey_generic_cyan					"cyan"
#define palkey_generic_black					"black"
#define palkey_generic_blue					"blue"
#define palkey_generic_gray					"gray"
#define palkey_generic_special					"special"

#define palidx_generic_body					0
#define palidx_generic_text_focused				1
#define palidx_generic_text_unfocused				2
#define palidx_generic_text_shortcut				3
#define palidx_generic_text_shortcut_selected			4
#define palidx_generic_text_selected				5
#define palidx_generic_text_disabled				6
#define palidx_generic_frame_focused				7
#define palidx_generic_frame_unfocused				8
#define palidx_generic_frame_move_resize			9
#define palidx_generic_frame_killer				10
#define palidx_generic_scrollbar				11
#define palidx_generic_input_focused				12
#define palidx_generic_input_unfocused				13
#define palidx_generic_input_selected				14
#define palidx_generic_input_clip 				15
#define palidx_generic_button_focused				16
#define palidx_generic_button_unfocused				17
#define palidx_generic_button_shadow 				18
#define palidx_generic_button_shortcut				19
#define palidx_generic_list_focused_selected			20
#define palidx_generic_list_focused_unselected			21
#define palidx_generic_list_unfocused_selected			22
#define palidx_generic_list_unfocused_unselected		23
#define palidx_generic_cluster_focused				24
#define palidx_generic_cluster_unfocused			25
#define palidx_generic_cluster_shortcut				26

/*
 *   reg/pal management
 */

vcp getcolorv(palette *pal, uint index);
bool load_pal(const char *pal_class, const char *pal_flavour, palette *p);

/*
 *	INIT
 */

bool init_pal();

/*
 *	DONE
 */

void done_pal();

#endif /* !__HTPAL_H__ */