OpenCPN Partial API docs
Loading...
Searching...
No Matches
GUI Namespace Reference

Organizes constant variables and methods. More...

Enumerations

enum class  Breakpoint : int {
  kExtraSmall = 1 , kSmall = 480 , kMedium = 767 , kLarge = 1024 ,
  kExtraLarge = 1440
}
 

Functions

template<typename T >
bool HasKey (const std::set< int > &set, T key)
 Check if a key exists in a set.
 
int GetSpacing (wxWindow *ctx, int factor)
 Multiply default spacing with a factor, and calculate device independent pixels.
 
void LayoutResizeEvent (wxWindow *ctx)
 Trigger window layout event.
 
Breakpoint GetScreenSize (wxRect *rect)
 Get screen size breakpoint.
 

Detailed Description

Organizes constant variables and methods.

Enumeration Type Documentation

◆ Breakpoint

enum class GUI::Breakpoint : int
strong

Definition at line 40 of file ui_utils.h.

Function Documentation

◆ GetScreenSize()

Breakpoint GUI::GetScreenSize ( wxRect *  rect)

Get screen size breakpoint.

Parameters
rectDisplay geometry.
Returns
Screen size breakpoint.

◆ GetSpacing()

int GUI::GetSpacing ( wxWindow *  ctx,
int  factor 
)

Multiply default spacing with a factor, and calculate device independent pixels.

Parameters
ctxWindow context.
intScaling factor.
Returns
Scaling in DIP.

◆ HasKey()

template<typename T >
bool GUI::HasKey ( const std::set< int > &  set,
key 
)

Check if a key exists in a set.

Parameters
setSet of keys.
keyAn enum class key (to be cast to int).

Definition at line 60 of file ui_utils.h.

◆ LayoutResizeEvent()

void GUI::LayoutResizeEvent ( wxWindow *  ctx)

Trigger window layout event.

Parameters
ctxWindow context.