OpenCPN Partial API docs
Loading...
Searching...
No Matches
dialog_base.h
1/***************************************************************************
2 * Copyright (C) 2025 by NoCodeHummel *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************
19 */
20#ifndef DIALOG_BASE_H
21#define DIALOG_BASE_H
22
23#include <wx/dialog.h>
24#include <wx/string.h>
25
26#include "ui_utils.h"
27
31class BaseDialog : public wxDialog {
32public:
33 BaseDialog(wxWindow* parent, const std::string& title,
34 long style = wxDEFAULT_DIALOG_STYLE);
35
40
45 int ShowModal() override;
46
51 void AddHtmlContent(const std::stringstream& html);
52
53protected:
54 wxBoxSizer* m_layout;
55 wxBoxSizer* m_content;
56
57 // padding scaling factor
58 static const int kDialogPadding = 2;
59};
60
61#endif // DIALOG_BASE_H
Dialog layout with content sizer.
Definition dialog_base.h:31
void AddHtmlContent(const std::stringstream &html)
Display HTML content.
void SetInitialSize()
Initialize by display geometry.
int ShowModal() override
Show dialog and return response.
GUI library utils and events.