2 * Copyright (C) 2007 by Mark Pustjens <pustjens@dds.nl>
3 * Copyright (C) 2010-2012 by CenterIM developers
5 * This file is part of CenterIM.
7 * CenterIM is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * CenterIM is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 * HorizontalListBox class.
29 #ifndef __HORIZONTALLISTBOX_H__
30 #define __HORIZONTALLISTBOX_H__
32 #include "AbstractListBox.h"
33 #include "VerticalLine.h"
39 * Implementation of AbstractListBox class where widgets are placed
42 class HorizontalListBox
43 : public AbstractListBox
46 HorizontalListBox(int w
, int h
);
47 virtual ~HorizontalListBox() {}
53 virtual VerticalLine
*InsertSeparator(size_t pos
);
54 virtual VerticalLine
*AppendSeparator();
55 virtual void InsertWidget(size_t pos
, Widget
& widget
);
56 virtual void AppendWidget(Widget
& widget
);
59 virtual Curses::Window
*GetSubPad(const Widget
& child
, int begin_x
,
60 int begin_y
, int ncols
, int nlines
);
62 virtual int GetChildrenWidth() const { return children_width
; };
64 sigc::signal
<void, HorizontalListBox
&, int> signal_children_width_change
;
68 int autosize_children
;
70 std::set
<const Widget
*> autosize_extra
;
71 bool reposition_widgets
;
74 virtual void OnChildMoveResize(Widget
& activator
, const Rect
& oldsize
,
76 virtual void OnChildVisible(Widget
& widget
, bool visible
);
78 virtual void UpdateScrollWidth();
81 HorizontalListBox(const HorizontalListBox
&);
82 HorizontalListBox
& operator=(const HorizontalListBox
&);
85 } // namespace CppConsUI
87 #endif // __HORIZONTALLISTBOX_H__
89 /* vim: set tabstop=2 shiftwidth=2 textwidth=78 expandtab : */