neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
i_dockable.hpp
Go to the documentation of this file.
1// i_dockable.hpp
2/*
3 neogfx C++ App/Game Engine
4 Copyright (c) 2020 Leigh Johnston. All Rights Reserved.
5
6 This program is free software: you can redistribute it and / or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include <neogfx/neogfx.hpp>
25
26namespace neogfx
27{
28 class i_widget;
29 class i_dock;
30
31 struct not_docked : std::logic_error { not_docked() : std::logic_error{ "neogfx::not_docked" } {} };
32
33 class i_dockable : public i_tool, public i_reference_counted
34 {
35 public:
36 declare_event(docked, i_dock&)
37 declare_event(undocked, i_dock&)
38 public:
40 public:
41 virtual ~i_dockable() = default;
42 public:
43 virtual bool can_dock(const i_dock& aDock) const = 0;
44 virtual bool is_docked() const = 0;
45 virtual const i_dock& which_dock() const = 0;
46 virtual i_dock& which_dock() = 0;
47 virtual void dock(i_dock& aDock) = 0;
48 virtual void undock() = 0;
49 public:
50 virtual const i_widget& docked_widget() const = 0;
51 virtual i_widget& docked_widget() = 0;
52 };
53}
virtual i_dock & which_dock()=0
virtual const i_widget & docked_widget() const =0
virtual const i_dock & which_dock() const =0
declare_event(docked, i_dock &) declare_event(undocked
virtual void undock()=0
virtual bool is_docked() const =0
virtual i_widget & docked_widget()=0
virtual bool can_dock(const i_dock &aDock) const =0
virtual ~i_dockable()=default
i_dockable abstract_type
virtual void dock(i_dock &aDock)=0
#define declare_event(declName,...)
Definition i_event.hpp:305