]>
cygwin.com Git - cygwin-apps/setup.git/blob - choose.h
2 * Copyright (c) 2000, Red Hat, Inc.
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.
9 * A copy of the GNU General Public License can be found at
12 * Written by Robert Collins <rbtcollins@hotmail.com>
24 #define CATEGORY_EXPANDED 0
25 #define CATEGORY_COLLAPSED 1
29 /* Note that the next four items must be in the same order as the
30 TRUST items in ini.h. */
41 /* Use ACTION_SAME when you want to leve the current version unaltered
42 * even if it that version is not in setup.ini
45 /* Actions taken when installed version matches the selected version. */
46 ACTION_SAME_PREV
= ACTION_PREV
+ ACTION_SAME
,
47 ACTION_SAME_CURR
= ACTION_CURR
+ ACTION_SAME
,
48 ACTION_SAME_TEST
= ACTION_TEST
+ ACTION_SAME
,
74 #include "package_meta.h"
81 virtual void paint (HDC hdc
, int x
, int y
, int row
, int show_cat
) = 0;
82 virtual int click (int const myrow
, int const ClickedRow
, int const x
) = 0;
83 virtual int itemcount () const = 0;
84 // this may indicate bad inheritance model.
85 virtual bool IsContainer (void) const = 0;
86 virtual void insert (pick_line
&) = 0;
87 // Never allocate to key, always allocated elsewhere
89 virtual ~ pick_line ()
96 pick_line (pick_line
const &);
97 pick_line
& operator= (pick_line
const &);
100 class pick_pkg_line
:public pick_line
103 pick_pkg_line (packagemeta
& apkg
):pkg (apkg
)
107 virtual void paint (HDC hdc
, int x
, int y
, int row
, int show_cat
);
108 virtual int click (int const myrow
, int const ClickedRow
, int const x
);
109 virtual int itemcount () const
113 virtual bool IsContainer (void) const
117 virtual void insert (pick_line
&)
124 class topbucket
:public pick_line
131 virtual void paint (HDC hdc
, int x
, int y
, int row
, int show_cat
);
132 virtual int click (int const myrow
, int const ClickedRow
, int const x
);
133 virtual int itemcount () const
136 for (size_t n
= 1; n
<= bucket
.number (); n
++)
137 t
+= bucket
[n
]->itemcount ();
140 virtual bool IsContainer (void) const
144 virtual void insert (pick_line
& aLine
)
146 bucket
.registerbyobject (aLine
);
148 virtual void empty (void);
149 virtual ~ topbucket ();
151 topbucket (topbucket
const &);
152 topbucket
& operator= (topbucket
const &);
154 list
< pick_line
, char const *, strcasecmp
> bucket
;
158 class pick_category_line
:public topbucket
161 pick_category_line (Category
& _cat
, bool aBool
=
162 true):cat (_cat
), collapsed (aBool
)
166 virtual void paint (HDC hdc
, int x
, int y
, int row
, int show_cat
);
167 virtual int click (int const myrow
, int const ClickedRow
, int const x
);
168 virtual int itemcount () const
173 for (size_t n
= 1; n
<= bucket
.number (); n
++)
174 t
+= bucket
[n
]->itemcount ();
177 virtual void insert (pick_line
& aLine
)
179 bucket
.registerbyobject (aLine
);
183 list
< pick_line
, char const *, strcasecmp
> bucket
;
191 views
get_view_mode ()
195 void set_view_mode (views _mode
);
196 struct _header
*headers
;
197 view (views mode
, HWND listview
);
198 const char *mode_caption ();
199 void insert_pkg (packagemeta
&);
200 void insert_category (Category
*, bool);
201 void clear_view (void);
202 int click (int row
, int x
);
212 void scroll (HWND hwnd
, int which
, int *var
, int code
);
213 HWND
ListHeader (void) const
223 void init_headers (HDC dc
);
227 class ChooserPage
:public PropertyPage
233 virtual ~ ChooserPage ()
237 virtual bool OnMessageApp (UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
240 virtual void OnActivate ();
243 #endif /* __cplusplus */
244 #endif /* _CHOOSE_H_ */
This page took 0.096328 seconds and 6 git commands to generate.