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>
30
31namespace neogfx
32{
33 class paragraph_dialog : public dialog
34 {
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 = {});
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}
paragraph_format const & selected_format() const
paragraph_format const & current_format() const
void select_paragraph_format(neogfx::paragraph_format const &aFormat)
size minimum_size(optional_size const &aAvailableSpace=optional_size{}) const override
#define meta_object(...)
Definition i_object.hpp:28
#define define_event(name, declName,...)
Definition event.hpp:200