Update list of wide characters
[centerim5.git] / cppconsui / SplitDialog.h
blobac92b7c53226ed5e6e219b5f6b526bb753a123d6
1 // Copyright (C) 2010-2015 Petr Pavlu <setup@dagobah.cz>
2 //
3 // This file is part of CenterIM.
4 //
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.
9 //
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/>.
18 /// @file
19 /// SplitDialog class.
20 ///
21 /// @ingroup cppconsui
23 #ifndef SPLITDIALOG_H
24 #define SPLITDIALOG_H
26 #include "AbstractDialog.h"
28 namespace CppConsUI {
30 class SplitDialog : public AbstractDialog {
31 public:
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;
36 // Widget
37 virtual void cleanFocus() override;
39 // Container
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;
48 protected:
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_;
56 // AbstractDialog
57 virtual void emitResponse(ResponseType response) override;
59 virtual void onOldFocusVisible(Widget &activator, bool visible);
61 private:
62 CONSUI_DISABLE_COPY(SplitDialog);
65 } // namespace CppConsUI
67 #endif // SPLITDIALOG_H
69 // vim: set tabstop=2 shiftwidth=2 textwidth=80 expandtab: