neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
paragraph_dialog.hpp
Go to the documentation of this file.
1
// paragraph_dialog.hpp
2
/*
3
neogfx C++ App/Game Engine
4
Copyright (c) 2023 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
>
23
#include <
neogfx/gui/dialog/dialog.hpp
>
24
#include <
neogfx/gui/widget/drop_list.hpp
>
25
#include <
neogfx/gui/widget/group_box.hpp
>
26
#include <
neogfx/gui/widget/radio_button.hpp
>
27
#include <
neogfx/gui/widget/check_box.hpp
>
28
#include <
neogfx/gui/widget/unit_spin_box.hpp
>
29
#include <
neogfx/gui/widget/text_edit.hpp
>
30
31
namespace
neogfx
32
{
33
class
paragraph_dialog
:
public
dialog
34
{
35
meta_object
(
dialog
)
36
public
:
37
define_event
(SelectionChanged, selection_changed)
38
public
:
39
paragraph_dialog
(paragraph_format
const
& aCurrentParagraphFormat = {});
40
paragraph_dialog
(
i_widget
& aParent, paragraph_format
const
& aCurrentParagraphFormat = {});
41
~paragraph_dialog
();
42
public
:
43
paragraph_format
const
&
current_format
()
const
;
44
paragraph_format
const
&
selected_format
()
const
;
45
void
select_paragraph_format
(neogfx::paragraph_format
const
& aFormat);
46
protected
:
47
size
minimum_size
(
optional_size
const
& aAvailableSpace =
optional_size
{})
const
override
;
48
private
:
49
void
init();
50
void
update_selected_format(
i_widget
const
& aUpdatingWidget);
51
void
update_widgets();
52
private
:
53
sink
iSink;
54
bool
iUpdating;
55
paragraph_format iCurrentParagraphFormat;
56
paragraph_format iSelectedParagraphFormat;
57
horizontal_layout
iLayout0;
58
group_box
iSampleBox;
59
text_edit iSample;
60
};
61
}
check_box.hpp
neogfx::basic_size< coordinate >
neogfx::dialog
Definition
dialog.hpp:37
neogfx::group_box
Definition
group_box.hpp:31
neogfx::horizontal_layout
Definition
horizontal_layout.hpp:29
neogfx::i_widget
Definition
i_widget.hpp:50
neogfx::paragraph_dialog
Definition
paragraph_dialog.hpp:34
neogfx::paragraph_dialog::selected_format
paragraph_format const & selected_format() const
neogfx::paragraph_dialog::current_format
paragraph_format const & current_format() const
neogfx::paragraph_dialog::select_paragraph_format
void select_paragraph_format(neogfx::paragraph_format const &aFormat)
neogfx::paragraph_dialog::minimum_size
size minimum_size(optional_size const &aAvailableSpace=optional_size{}) const override
neolib::optional
Definition
optional.hpp:55
neolib::sink
Definition
i_event.hpp:255
dialog.hpp
drop_list.hpp
group_box.hpp
neogfx
Definition
action.hpp:28
meta_object
#define meta_object(...)
Definition
i_object.hpp:28
neogfx.hpp
define_event
#define define_event(name, declName,...)
Definition
event.hpp:200
radio_button.hpp
text_edit.hpp
unit_spin_box.hpp
include
neogfx
gui
dialog
paragraph_dialog.hpp
Generated by
1.9.8