MostlyHarmless 0.0.1
 
Loading...
Searching...
No Matches
mostly_harmless::gui::helpers::macos Namespace Reference

macOS specific gui helper functions More...

Functions

void * createView (std::uint32_t width, std::uint32_t height)
 
void removeFromParentView (void *viewHandle)
 
void setViewSize (void *viewHandle, std::uint32_t width, std::uint32_t height)
 
void getViewSize (void *viewHandle, std::uint32_t *width, std::uint32_t *height)
 
void reparentView (void *hostViewHandle, void *clientViewHandle, void *childViewHandle, Colour backgroundColour)
 
void showView (void *viewHandle)
 
void hideView (void *viewHandle)
 

Detailed Description

macOS specific gui helper functions

Function Documentation

◆ createView()

void * mostly_harmless::gui::helpers::macos::createView ( std::uint32_t width,
std::uint32_t height )

◆ getViewSize()

void mostly_harmless::gui::helpers::macos::getViewSize ( void * viewHandle,
std::uint32_t * width,
std::uint32_t * height )

Retrieves an NSView's size.

Parameters
viewHandleA void* to the NSView to query.
widthA pointer to the width variable - the result will be written here.
heightA pointer to the height variable - the result will be written here.

◆ hideView()

void mostly_harmless::gui::helpers::macos::hideView ( void * viewHandle)

Sets an NSView as hidden.

Parameters
viewHandleA void* to the NSView to set hidden.

◆ removeFromParentView()

void mostly_harmless::gui::helpers::macos::removeFromParentView ( void * viewHandle)

Removes an NSView from its parent NSView.

Parameters
viewHandleA void* to the NSView to remove.

◆ reparentView()

void mostly_harmless::gui::helpers::macos::reparentView ( void * hostViewHandle,
void * clientViewHandle,
void * childViewHandle,
Colour backgroundColour )

Adds an NSView as a subview of another NSView.

Parameters
parentViewHandleA void* to the NSView to add the child view to.
childViewHandleA void* to the NSView to add to the parent view.

◆ setViewSize()

void mostly_harmless::gui::helpers::macos::setViewSize ( void * viewHandle,
std::uint32_t width,
std::uint32_t height )

Sets an NSView's size.

Parameters
viewHandleA void* to the NSView* to resize.
widthThe new width.
heightThe new height.

◆ showView()

void mostly_harmless::gui::helpers::macos::showView ( void * viewHandle)

Sets an NSView as visible.

Parameters
viewHandleA void* to the NSView to set visible.