]>
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>
16 #ifndef SETUP_PICKCATEGORYLINE_H
17 #define SETUP_PICKCATEGORYLINE_H
23 #include "package_meta.h"
25 class PickCategoryLine
:public PickLine
28 PickCategoryLine (PickView
& aView
, Category
& _cat
, size_t thedepth
= 0, bool aBool
=
30 true):PickLine (_cat
.first
),
31 current_default (packagemeta::Default_action
), cat (_cat
), labellength (0),
32 depth (thedepth
), theView (aView
)
49 void ShowLabel (bool aBool
= true)
55 virtual void paint (HDC hdc
, HRGN hUpdRgn
, int x
, int y
, int row
, int show_cat
);
56 virtual int click (int const myrow
, int const ClickedRow
, int const x
);
57 virtual int itemcount () const
61 int t
= show_label
? 1 : 0;
62 for (size_t n
= 0; n
< bucket
.size (); ++n
)
63 t
+= bucket
[n
]->itemcount ();
66 virtual bool IsContainer (void) const
70 virtual void insert (PickLine
& aLine
)
72 bucket
.push_back (&aLine
);
75 virtual int set_action (packagemeta::_actions
);
83 size_t spin_x
; // x-coord where the spin button starts
85 PickCategoryLine (PickCategoryLine
const &);
86 PickCategoryLine
& operator= (PickCategoryLine
const &);
87 std::vector
< PickLine
* > bucket
;
90 #endif /* SETUP_PICKCATEGORYLINE_H */
This page took 0.038577 seconds and 5 git commands to generate.