]>
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>
22 #define CATEGORY_EXPANDED 0
23 #define CATEGORY_COLLAPSED 1
27 /* Note that the next four items must be in the same order as the
28 TRUST items in ini.h. */
39 /* Use ACTION_SAME when you want to leve the current version unaltered
40 * even if it that version is not in setup.ini
43 /* Actions taken when installed version matches the selected version. */
44 ACTION_SAME_PREV
= ACTION_PREV
+ ACTION_SAME
,
45 ACTION_SAME_CURR
= ACTION_CURR
+ ACTION_SAME
,
46 ACTION_SAME_TEST
= ACTION_TEST
+ ACTION_SAME
,
72 #include "package_meta.h"
79 virtual void paint (HDC hdc
, int x
, int y
, int row
, int show_cat
) = 0;
80 virtual int click (int const myrow
, int const ClickedRow
, int const x
) = 0;
81 virtual int itemcount () const = 0;
82 // this may indicate bad inheritance model.
83 virtual bool IsContainer (void) const = 0;
84 virtual void insert (pick_line
&) = 0;
85 // Never allocate to key, always allocated elsewhere
87 virtual ~pick_line () {};
90 pick_line (pick_line
const &);
91 pick_line
&operator= (pick_line
const &);
94 class pick_pkg_line
: public pick_line
97 pick_pkg_line (packagemeta
&apkg
) : pkg (apkg
) {
99 virtual void paint (HDC hdc
, int x
, int y
, int row
, int show_cat
);
100 virtual int click (int const myrow
, int const ClickedRow
, int const x
);
101 virtual int itemcount () const {return 1;}
102 virtual bool IsContainer (void) const {return false;}
103 virtual void insert (pick_line
&) {};
108 class topbucket
: public pick_line
113 virtual void paint (HDC hdc
, int x
, int y
, int row
, int show_cat
);
114 virtual int click (int const myrow
, int const ClickedRow
, int const x
);
115 virtual int itemcount () const
118 for (size_t n
= 1; n
<= bucket
.number (); n
++)
119 t
+= bucket
[n
]->itemcount ();
122 virtual bool IsContainer (void) const {return true;}
123 virtual void insert (pick_line
&aLine
)
125 bucket
.registerbyobject (aLine
);
127 virtual void empty (void);
128 virtual ~topbucket ();
130 topbucket (topbucket
const &);
131 topbucket
&operator= (topbucket
const &);
133 list
<pick_line
, char const *, strcasecmp
> bucket
;
137 class pick_category_line
: public topbucket
140 pick_category_line (Category
& _cat
, bool aBool
= true) : cat (_cat
), collapsed (aBool
) {
142 virtual void paint (HDC hdc
, int x
, int y
, int row
, int show_cat
);
143 virtual int click (int const myrow
, int const ClickedRow
, int const x
);
144 virtual int itemcount () const
149 for (size_t n
= 1; n
<= bucket
.number (); n
++)
150 t
+= bucket
[n
]->itemcount ();
153 virtual void insert (pick_line
&aLine
)
155 bucket
.registerbyobject (aLine
);
159 list
<pick_line
, char const *, strcasecmp
> bucket
;
167 views
get_view_mode ()
171 void set_view_mode (views _mode
);
172 struct _header
*headers
;
173 view (views mode
, HWND listview
);
174 const char *mode_caption ();
175 void insert_pkg (packagemeta
&);
176 void insert_category (Category
*, bool);
177 void clear_view (void);
178 int click (int row
, int x
);
188 void scroll (HWND hwnd
, int which
, int *var
, int code
);
189 HWND
ListHeader (void) const {return listheader
;}
196 void init_headers (HDC dc
);
198 #endif /* __cplusplus */
199 #endif /* _CHOOSE_H_ */
This page took 0.111656 seconds and 6 git commands to generate.