]>
Commit | Line | Data |
---|---|---|
de6a1a64 RC |
1 | /* |
2 | * Copyright (c) 2001, Robert Collins. | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License as published by | |
6 | * the Free Software Foundation; either version 2 of the License, or | |
7 | * (at your option) any later version. | |
8 | * | |
9 | * A copy of the GNU General Public License can be found at | |
10 | * http://www.gnu.org/ | |
11 | * | |
12 | * Written by Robert Collins <rbtcollins@hotmail.com> | |
13 | * | |
14 | */ | |
15 | ||
16 | #ifndef _SITE_H_ | |
17 | #define _SITE_H_ | |
18 | ||
19 | /* required to parse this file */ | |
ab57ceaa RC |
20 | #include <string.h> |
21 | #include <stdlib.h> | |
de6a1a64 RC |
22 | #include "list.h" |
23 | ||
ab57ceaa RC |
24 | #include "proppage.h" |
25 | ||
26 | class SitePage:public PropertyPage | |
27 | { | |
28 | public: | |
29 | SitePage () | |
30 | { | |
31 | }; | |
32 | virtual ~ SitePage () | |
33 | { | |
34 | }; | |
35 | ||
36 | bool Create (); | |
37 | ||
38 | virtual void OnInit (); | |
b7301c43 | 39 | virtual void OnActivate (); |
ab57ceaa RC |
40 | virtual long OnNext (); |
41 | virtual long OnBack (); | |
b7301c43 RC |
42 | |
43 | virtual bool OnMessageCmd (int id, HWND hwndctl, UINT code); | |
44 | ||
45 | void PopulateListBox(); | |
46 | void CheckControlsAndDisableAccordingly () const; | |
ab57ceaa RC |
47 | }; |
48 | ||
49 | void do_download_site_info (HINSTANCE h, HWND owner); | |
50 | ||
de6a1a64 RC |
51 | class site_list_type |
52 | { | |
53 | public: | |
ab57ceaa RC |
54 | site_list_type ():url (0), displayed_url (0), key (0) |
55 | { | |
56 | }; | |
de6a1a64 RC |
57 | site_list_type (char const *); |
58 | /* workaround for missing placement new in gcc 2.95 */ | |
59 | void init (char const *); | |
ab57ceaa | 60 | ~site_list_type () |
de6a1a64 RC |
61 | { |
62 | if (url) | |
63 | free (url); | |
64 | if (displayed_url) | |
65 | free (displayed_url); | |
66 | if (key) | |
67 | free (key); | |
68 | }; | |
69 | char *url; | |
70 | char *displayed_url; | |
71 | char *key; | |
72 | }; | |
73 | ||
74 | /* user chosen sites */ | |
ab57ceaa | 75 | extern list < site_list_type, const char *, strcasecmp > site_list; |
de6a1a64 | 76 | /* potential sites */ |
ab57ceaa | 77 | extern list < site_list_type, const char *, strcasecmp > all_site_list; |
de6a1a64 RC |
78 | |
79 | void save_site_url (); | |
80 | ||
81 | #endif /* _SITE_H_ */ |