1 // Copyright (C) 2010-2015 Petr Pavlu <setup@dagobah.cz>
3 // This file is part of CenterIM.
5 // CenterIM is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // CenterIM is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with CenterIM. If not, see <http://www.gnu.org/licenses/>.
19 /// SplitDialog class.
21 /// @ingroup cppconsui
26 #include "AbstractDialog.h"
30 class SplitDialog
: public AbstractDialog
{
32 SplitDialog(int x
, int y
, int w
, int h
, const char *title
= nullptr);
33 explicit SplitDialog(const char *title
= nullptr);
34 virtual ~SplitDialog() override
;
37 virtual void cleanFocus() override
;
40 virtual void moveFocus(FocusDirection direction
) override
;
42 virtual void setContainer(Container
&cont
);
43 virtual Container
*getContainer() const { return container_
; }
45 /// Signal emitted when user closes the dialog.
46 sigc::signal
<void, SplitDialog
&, ResponseType
> signal_response
;
49 Container
*container_
;
51 Widget
*cont_old_focus_
;
52 Widget
*buttons_old_focus_
;
53 sigc::connection cont_old_focus_conn_
;
54 sigc::connection buttons_old_focus_conn_
;
57 virtual void emitResponse(ResponseType response
) override
;
59 virtual void onOldFocusVisible(Widget
&activator
, bool visible
);
62 CONSUI_DISABLE_COPY(SplitDialog
);
65 } // namespace CppConsUI
67 #endif // SPLITDIALOG_H
69 // vim: set tabstop=2 shiftwidth=2 textwidth=80 expandtab: