OpenCPN Partial API docs
Loading...
Searching...
No Matches
ui_utils.h
Go to the documentation of this file.
1/***************************************************************************
2 * Copyright (C) 2025 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, see <https://www.gnu.org/licenses/>. *
16 **************************************************************************/
17#ifndef UI_UTILS_H
18#define UI_UTILS_H
19
26#include <wx/window.h>
27#include <wx/event.h>
28
29// Declare custom events
30wxDECLARE_EVENT(EVT_LAYOUT_RESIZE, wxCommandEvent);
31
35namespace libgui {
36
41static constexpr int kSpacing = 6;
42
50int GetSpacing(const wxWindow* ctx, int factor);
51
56void LayoutResizeEvent(wxWindow* ctx);
57
58} // namespace gui
59
60#endif // UI_UTILS_H
Organizes constant variables and methods.
Definition ui_utils.h:35
void LayoutResizeEvent(wxWindow *ctx)
Trigger window layout event.
int GetSpacing(const wxWindow *ctx, int factor)
Multiply default spacing with a factor, and calculate device independent pixels.