GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
gui_framework::utility Namespace Reference

Namespaces

namespace  paint
 

Classes

class  AdditionalCreationData
 Base templated class for component creators. More...
 
class  AdditionalCreationData< Button >
 Specialization for Button. More...
 
class  AdditionalCreationData< CheckBox >
 Specialization for CheckBox. More...
 
class  AdditionalCreationData< ChildWindow >
 Specialization for ChildWindow. More...
 
class  AdditionalCreationData< DropDownComboBox >
 Specialization for DropDownComboBox. More...
 
class  AdditionalCreationData< DropDownListComboBox >
 Specialization for DropDownListComboBox. More...
 
class  AdditionalCreationData< EditControl >
 Specialization for EditControl. More...
 
class  AdditionalCreationData< GroupBox >
 Specialization for GroupBox. More...
 
class  AdditionalCreationData< HorizontalTrackbarControl >
 Specialization for HorizontalTrackbarControl. More...
 
class  AdditionalCreationData< IconListView >
 Specialization for IconListView. More...
 
class  AdditionalCreationData< ImageButton >
 Specialization for ImageButton. More...
 
class  AdditionalCreationData< InfiniteProgressBar >
 Specialization for InfiniteProgressBar. More...
 
class  AdditionalCreationData< ListBox >
 Specialization for ListBox. More...
 
class  AdditionalCreationData< ListIconListView >
 Specialization for ListIconListView. More...
 
class  AdditionalCreationData< ListTextIconListView >
 Specialization for ListTextIconListView. More...
 
class  AdditionalCreationData< ListTextListView >
 Specialization for ListTextListView. More...
 
class  AdditionalCreationData< MultipleSelectListBox >
 Specialization for MultipleSelectListBox. More...
 
class  AdditionalCreationData< ProgressBar >
 Specialization for ProgressBar. More...
 
class  AdditionalCreationData< RichEdit >
 Specialization for RichEdit. More...
 
class  AdditionalCreationData< SeparateWindow >
 Specialization for SeparateWindow. More...
 
class  AdditionalCreationData< SimpleComboBox >
 Specialization for SimpleComboBox. More...
 
class  AdditionalCreationData< StaticControl >
 Specialization for StaticControl. More...
 
class  AdditionalCreationData< TabControl >
 Specialization for TabControl. More...
 
class  AdditionalCreationData< TextIconListView >
 Specialization for TextIconListView. More...
 
class  AdditionalCreationData< TextListView >
 Specialization for TextListView. More...
 
class  AdditionalCreationData< VerticalTrackbarControl >
 Specialization for VerticalTrackbarControl. More...
 
class  BaseComponentCreator
 Interface for components creation(factory method pattern) More...
 
class  BaseLoadableHolder
 Base class for all visual asset loaders. More...
 
class  ButtonCreator
 Button creator. More...
 
class  CheckBoxCreator
 CheckBox creator. More...
 
class  ChildWindowCreator
 ChildWindow creator. More...
 
struct  ComponentSettings
 All settings for windows. More...
 
class  CursorsHolder
 Cursors loader. More...
 
class  DropDownComboBoxCreator
 DropDownComboBox creator. More...
 
class  DropDownListComboBoxCreator
 DropDownListComboBox creator. More...
 
class  EditControlCreator
 EditControl creator. More...
 
class  GroupBoxCreator
 GroupBox creator. More...
 
class  HorizontalTrackbarControlCreator
 Button creator. More...
 
class  IconListViewCreator
 IconListView creator. More...
 
class  IconsHolder
 Icons loader. More...
 
class  ImageButtonCreator
 ImageButton creator. More...
 
class  ImagesHolder
 Images loader. More...
 
class  InfiniteProgressBarCreator
 InfiniteProgressBar creator. More...
 
class  ListBoxCreator
 ListBox creator. More...
 
class  ListIconListViewCreator
 ListIconListView creator. More...
 
class  ListTextIconListViewCreator
 ListTextIconListView creator. More...
 
class  ListTextListViewCreator
 ListTextListView creator. More...
 
class  MultipleSelectListBoxCreator
 MultipleSelectListBox creator. More...
 
class  ProgressBarCreator
 ProgressBar creator. More...
 
class  RichEditCreator
 RichEdit creator. More...
 
class  SeparateWindowCreator
 SeparateWindow creator. More...
 
class  SimpleComboBoxCreator
 SimpleComboBox creator. More...
 
class  StaticControlCreator
 StaticControl creator. More...
 
class  TabControlCreator
 TabControl creator. More...
 
class  TextIconListViewCreator
 TextIconListView creator. More...
 
class  TextListViewCreator
 TextListView creator. More...
 
class  VerticalTrackbarControlCreator
 Button creator. More...
 

Enumerations

enum class  iconListViewType : uint32_t { icon , smallIcon = 2 }
 

Functions

void unregisterClass (wstring_view className)
 
void appendStyle (HWND handle, LONG_PTR newStyle)
 Append WinAPI style.
 
void removeStyle (HWND handle, LONG_PTR styleToRemove)
 Remove WinAPI style.
 
string to_string (wstring_view stringToConvert, uint32_t codepage)
 
wstring to_wstring (const string &stringToConvert, uint32_t codepage)
 
HMODULE getCurrentModule ()
 Get handle to current executable.
 
string getStringFromRawPath (const filesystem::path &pathFromRawString)
 
void loadFunctionFromModule (function< void()> &onClick, const string &functionName, const string &moduleName)
 
void loadEventCallbackFromModule (function< void(const wstring &)> &eventCallback, const string &functionName, const string &moduleName)
 
int getCenterX (int width)
 Get center X coordinate.
 
int getCenterY (int height)
 Get center Y coordinate.
 
string getGUIFrameworkVersion ()
 Get current version of GUIFramework.
 
GUI_FRAMEWORK_API_FUNCTION void unregisterClass (std::wstring_view className)
 Unregister class that is used in SeparateWindow, ChildWindow, DialogBox, GroupBox.
 
GUI_FRAMEWORK_API_FUNCTION std::string to_string (std::wstring_view stringToConvert, uint32_t codepage)
 Convert std::wstring to std::string.
 
GUI_FRAMEWORK_API_FUNCTION std::wstring to_wstring (const std::string &stringToConvert, uint32_t codepage)
 Convert std::string to std::wstring.
 
GUI_FRAMEWORK_API_FUNCTION std::string getStringFromRawPath (const std::filesystem::path &pathFromRawString)
 Get string with \ from raw string contructed path.
 
GUI_FRAMEWORK_API_FUNCTION void loadFunctionFromModule (std::function< void()> &onClick, const std::string &functionName, const std::string &moduleName)
 Load function from module.
 
GUI_FRAMEWORK_API_FUNCTION void loadEventCallbackFromModule (std::function< void(const std::wstring &)> &eventCallback, const std::string &functionName, const std::string &moduleName)
 Load function from module.
 
template<typename T , typename... Args>
smartPointerType< T > make_smart_pointer (Args &&... args)
 Make function with current build configuration compatibility.
 
template<typename T >
size_t getTypeHash ()
 

Enumeration Type Documentation

◆ iconListViewType

enum class gui_framework::utility::iconListViewType : uint32_t
strong
Enumerator
icon 
smallIcon 

Definition at line 12 of file BaseLoadableHolder.h.

Function Documentation

◆ appendStyle()

GUI_FRAMEWORK_API_FUNCTION void gui_framework::utility::appendStyle ( HWND handle,
LONG_PTR newStyle )

Append WinAPI style.

Parameters
handle
newStyle

Definition at line 21 of file Utility.cpp.

◆ getCenterX()

GUI_FRAMEWORK_API_FUNCTION int gui_framework::utility::getCenterX ( int width)

Get center X coordinate.

Definition at line 168 of file Utility.cpp.

◆ getCenterY()

GUI_FRAMEWORK_API_FUNCTION int gui_framework::utility::getCenterY ( int height)

Get center Y coordinate.

Definition at line 173 of file Utility.cpp.

◆ getCurrentModule()

GUI_FRAMEWORK_API_FUNCTION HMODULE gui_framework::utility::getCurrentModule ( )

Get handle to current executable.

Returns

Definition at line 119 of file Utility.cpp.

◆ getGUIFrameworkVersion()

GUI_FRAMEWORK_API_FUNCTION std::string gui_framework::utility::getGUIFrameworkVersion ( )

Get current version of GUIFramework.

Returns

Definition at line 178 of file Utility.cpp.

◆ getStringFromRawPath() [1/2]

string gui_framework::utility::getStringFromRawPath ( const filesystem::path & pathFromRawString)

Definition at line 124 of file Utility.cpp.

◆ getStringFromRawPath() [2/2]

GUI_FRAMEWORK_API_FUNCTION std::string gui_framework::utility::getStringFromRawPath ( const std::filesystem::path & pathFromRawString)

Get string with \ from raw string contructed path.

Parameters
pathFromRawString
Returns

◆ getTypeHash()

template<typename T >
size_t gui_framework::utility::getTypeHash ( )
inline

Definition at line 109 of file Utility.h.

◆ loadEventCallbackFromModule() [1/2]

void gui_framework::utility::loadEventCallbackFromModule ( function< void(const wstring &)> & eventCallback,
const string & functionName,
const string & moduleName )

Definition at line 153 of file Utility.cpp.

◆ loadEventCallbackFromModule() [2/2]

GUI_FRAMEWORK_API_FUNCTION void gui_framework::utility::loadEventCallbackFromModule ( std::function< void(const std::wstring &)> & eventCallback,
const std::string & functionName,
const std::string & moduleName )

Load function from module.

Parameters
eventCallbackOutput parameter for function load
functionNameName of function in module
moduleNameName of module in JSON array modules in gui_framework.json
Exceptions
CantFindFunctionFromModuleException

◆ loadFunctionFromModule() [1/2]

void gui_framework::utility::loadFunctionFromModule ( function< void()> & onClick,
const string & functionName,
const string & moduleName )

Definition at line 138 of file Utility.cpp.

◆ loadFunctionFromModule() [2/2]

GUI_FRAMEWORK_API_FUNCTION void gui_framework::utility::loadFunctionFromModule ( std::function< void()> & onClick,
const std::string & functionName,
const std::string & moduleName )

Load function from module.

Parameters
onClickOutput parameter for function load
functionNameName of function in module
moduleNameName of module in JSON array modules in gui_framework.json
Exceptions
CantFindFunctionFromModuleException

◆ make_smart_pointer()

template<typename T , typename... Args>
smartPointerType< T > gui_framework::utility::make_smart_pointer ( Args &&... args)
inline

Make function with current build configuration compatibility.

Template Parameters
TType
Parameters
...argsConstructor arguments
Returns
Compatible smart pointer

Definition at line 96 of file Utility.h.

◆ removeStyle()

GUI_FRAMEWORK_API_FUNCTION void gui_framework::utility::removeStyle ( HWND handle,
LONG_PTR styleToRemove )

Remove WinAPI style.

Parameters
handle
styleToRemove

Definition at line 31 of file Utility.cpp.

◆ to_string() [1/2]

GUI_FRAMEWORK_API_FUNCTION std::string gui_framework::utility::to_string ( std::wstring_view stringToConvert,
uint32_t codepage )

Convert std::wstring to std::string.

Parameters
stringToConvert
codepagestringToConvert codepage
Returns
stringToConvert data as std::string
Exceptions
json::exceptions::WrongEncodingException

◆ to_string() [2/2]

string gui_framework::utility::to_string ( wstring_view stringToConvert,
uint32_t codepage )

Definition at line 41 of file Utility.cpp.

◆ to_wstring() [1/2]

GUI_FRAMEWORK_API_FUNCTION std::wstring gui_framework::utility::to_wstring ( const std::string & stringToConvert,
uint32_t codepage )

Convert std::string to std::wstring.

Parameters
stringToConvert
codepagestringToConvert codepage
Returns
stringToConvert data as std::wstring
Exceptions
json::exceptions::WrongEncodingException

◆ to_wstring() [2/2]

wstring gui_framework::utility::to_wstring ( const string & stringToConvert,
uint32_t codepage )

Definition at line 82 of file Utility.cpp.

◆ unregisterClass() [1/2]

GUI_FRAMEWORK_API_FUNCTION void gui_framework::utility::unregisterClass ( std::wstring_view className)

Unregister class that is used in SeparateWindow, ChildWindow, DialogBox, GroupBox.

Parameters
className

◆ unregisterClass() [2/2]

void gui_framework::utility::unregisterClass ( wstring_view className)

Definition at line 16 of file Utility.cpp.