]>
cygwin.com Git - cygwin-apps/setup.git/blob - PickCategoryLine.h
2 * Copyright (c) 2002 Robert Collins.
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 <robertc@hotmail.com>
17 #ifndef _PICKCATEGORYLINE_H_
18 #define _PICKCATEGORYLINE_H_
22 #include "package_meta.h"
24 class PickCategoryLine
:public PickLine
27 PickCategoryLine (PickView
& aView
, Category
& _cat
, size_t thedepth
= 0, bool aBool
=
29 true):PickLine (_cat
.key
),
30 current_default (packagemeta::Default_action
), cat (_cat
), labellength (0),
31 depth (thedepth
), theView (aView
)
48 void ShowLabel (bool aBool
= true)
54 virtual void paint (HDC hdc
, int x
, int y
, int row
, int show_cat
);
55 virtual int click (int const myrow
, int const ClickedRow
, int const x
);
56 virtual int itemcount () const
60 int t
= show_label
? 1 : 0;
61 for (size_t n
= 1; n
<= bucket
.number (); n
++)
62 t
+= bucket
[n
]->itemcount ();
65 virtual bool IsContainer (void) const
69 virtual void insert (PickLine
& aLine
)
71 bucket
.registerbyobject (aLine
);
74 virtual int set_action (packagemeta::_actions
);
83 PickCategoryLine (PickCategoryLine
const &);
84 PickCategoryLine
& operator= (PickCategoryLine
const &);
85 list
< PickLine
, String
, String::casecompare
> bucket
;
88 #endif // _PICKCATEGORYLINE_H_
This page took 0.051932 seconds and 5 git commands to generate.