]>
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> | |
3bac26a1 | 22 | #include <vector> |
3c054baf | 23 | #include "String++.h" |
de6a1a64 | 24 | |
ab57ceaa RC |
25 | #include "proppage.h" |
26 | ||
27 | class SitePage:public PropertyPage | |
28 | { | |
29 | public: | |
30 | SitePage () | |
31 | { | |
32 | }; | |
33 | virtual ~ SitePage () | |
34 | { | |
35 | }; | |
36 | ||
37 | bool Create (); | |
38 | ||
39 | virtual void OnInit (); | |
b7301c43 | 40 | virtual void OnActivate (); |
ab57ceaa RC |
41 | virtual long OnNext (); |
42 | virtual long OnBack (); | |
b7301c43 RC |
43 | |
44 | virtual bool OnMessageCmd (int id, HWND hwndctl, UINT code); | |
45 | ||
46 | void PopulateListBox(); | |
47 | void CheckControlsAndDisableAccordingly () const; | |
ab57ceaa RC |
48 | }; |
49 | ||
50 | void do_download_site_info (HINSTANCE h, HWND owner); | |
51 | ||
de6a1a64 RC |
52 | class site_list_type |
53 | { | |
54 | public: | |
3bac26a1 | 55 | site_list_type ():url (), displayed_url (), key() |
ab57ceaa RC |
56 | { |
57 | }; | |
3bac26a1 | 58 | site_list_type (site_list_type const &); |
3c054baf | 59 | site_list_type (String const &); |
de6a1a64 | 60 | /* workaround for missing placement new in gcc 2.95 */ |
3c054baf RC |
61 | void init (String const &); |
62 | ~site_list_type () {}; | |
3bac26a1 | 63 | site_list_type &operator= (site_list_type const &); |
3c054baf RC |
64 | String url; |
65 | String displayed_url; | |
66 | String key; | |
3bac26a1 RC |
67 | bool operator == (site_list_type const &) const; |
68 | bool operator != (site_list_type const &) const; | |
69 | bool operator < (site_list_type const &) const; | |
70 | bool operator <= (site_list_type const &) const; | |
71 | bool operator > (site_list_type const &) const; | |
72 | bool operator >= (site_list_type const &) const; | |
de6a1a64 RC |
73 | }; |
74 | ||
3bac26a1 RC |
75 | typedef vector <site_list_type> SiteList; |
76 | ||
de6a1a64 | 77 | /* user chosen sites */ |
3bac26a1 | 78 | extern SiteList site_list; |
de6a1a64 | 79 | /* potential sites */ |
3bac26a1 | 80 | extern SiteList all_site_list; |
de6a1a64 RC |
81 | |
82 | void save_site_url (); | |
83 | ||
84 | #endif /* _SITE_H_ */ |