cpp-project-template 0.0.1.0
C++ Project Template
Loading...
Searching...
No Matches
cpp_proj Namespace Reference

Namespace for this application. More...

Classes

class  App
 This class is the entry point for this wxWidgets app. More...
class  MainFrame
 This class represents the main window. More...

Functions

void printHelp ()
 Print the usage of the application.
void printVersion ()
 Print the version of the application.
void printHelpAndExit ()
 Calls cpp_proj::printHelp and exits with success.
void printVersionAndExit ()
 Calls cpp_proj::printVersion and exits with success.
void parseUserOptions (const std::span< char * > &args)
 Gets the user options from the command line.
void showSplashScreen (const wxString &fileName, const unsigned long durationMs, const wxBitmapType bitmapType=wxBITMAP_TYPE_ANY)
 Shows the splashscreen.
void showSplashScreen (const wxImage &img, const unsigned long durationMs)
 Shows the splashscreen.
wxImage alphaToBlackAndWhiteMask (const wxImage &img)
 Creates a black & white mask for the alpha channel.
std::string wordWrap (const std::string &str, size_t width)
 Breaks a string into multiple lines, each not exceeding the specified width.

Variables

std::string_view progName
 This application's executable name, to be set at the start of the main function.

Detailed Description

Namespace for this application.

Function Documentation

◆ alphaToBlackAndWhiteMask()

wxImage cpp_proj::alphaToBlackAndWhiteMask ( const wxImage & img)

Creates a black & white mask for the alpha channel.

Parameters
[in]imgThe image to create the mask for.
Returns
wxImage The black & white mask for the alpha channel.

◆ parseUserOptions()

void cpp_proj::parseUserOptions ( const std::span< char * > & args)

Gets the user options from the command line.

Parameters
argsThe command line arguments.

◆ printHelp()

void cpp_proj::printHelp ( )

Print the usage of the application.

◆ printHelpAndExit()

void cpp_proj::printHelpAndExit ( )

Calls cpp_proj::printHelp and exits with success.

◆ printVersion()

void cpp_proj::printVersion ( )

Print the version of the application.

◆ printVersionAndExit()

void cpp_proj::printVersionAndExit ( )

Calls cpp_proj::printVersion and exits with success.

◆ showSplashScreen() [1/2]

void cpp_proj::showSplashScreen ( const wxImage & img,
const unsigned long durationMs )

Shows the splashscreen.

Parameters
[in]imgThe splashscreen image.
[in]durationMsThe duration of the splashscreen.

◆ showSplashScreen() [2/2]

void cpp_proj::showSplashScreen ( const wxString & fileName,
const unsigned long durationMs,
const wxBitmapType bitmapType = wxBITMAP_TYPE_ANY )

Shows the splashscreen.

Parameters
[in]fileNameThe splashscreen image file path.
[in]durationMsThe duration of the splashscreen.
[in]bitmapTypeThe image file type of the splashscreen.

◆ wordWrap()

std::string cpp_proj::wordWrap ( const std::string & str,
size_t width )

Breaks a string into multiple lines, each not exceeding the specified width.

Parameters
[in]strThe string to break into multiple lines
[in]widthThe maximum number of characters each line can have.
Returns
The string broken into multiple lines.

Variable Documentation

◆ progName

std::string_view cpp_proj::progName
inline

This application's executable name, to be set at the start of the main function.