neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
i_title_bar.hpp
Go to the documentation of this file.
1// i_title_bar.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#pragma once
20
21#include <neogfx/neogfx.hpp>
26
27namespace neogfx
28{
29 class i_title_bar : public i_widget
30 {
31 public:
33 public:
34 struct unsupported_operation : std::logic_error { unsupported_operation() : std::logic_error{ "neogfx::i_title_bar::unsupported_operation" } {} };
35 public:
36 virtual ~i_title_bar() = default;
37 public:
38 virtual void set_icon(i_texture const& aIcon) = 0;
39 virtual i_image_widget const& icon_widget() const = 0;
41 virtual i_string const& title() const = 0;
42 virtual void set_title(i_string const& aTitle) = 0;
43 virtual i_text_widget const& title_widget() const = 0;
45 // todo: get/set icon
46 public:
47 };
48}
virtual void set_title(i_string const &aTitle)=0
virtual i_image_widget & icon_widget()=0
virtual i_string const & title() const =0
virtual ~i_title_bar()=default
virtual i_image_widget const & icon_widget() const =0
virtual i_text_widget & title_widget()=0
i_title_bar abstract_type
virtual void set_icon(i_texture const &aIcon)=0
virtual i_text_widget const & title_widget() const =0