40 PAINTSTRUCT paint = {};
42 HDC deviceContext = BeginPaint(handle, &paint);
43 LPARAM drawData = NULL;
44 uint32_t flags = DSS_NORMAL;
51 drawData =
reinterpret_cast<LPARAM
>(imagesHolder.
getImage(index));
55 catch (
const bad_cast&)
59 drawData =
reinterpret_cast<LPARAM
>(iconsHolder.
getIcon(index));
66 ReleaseDC(handle, deviceContext);
68 EndPaint(handle, &paint);
bool drawImplementation(const gui_framework::BaseWindow *window, const gui_framework::utility::BaseLoadableHolder &holder, int x, int y, const T &index)
#define GUI_FRAMEWORK_API_FUNCTION
Base class for composite windows.
Base class for all visual asset loaders.
virtual uint16_t getImagesWidth() const final
virtual uint16_t getImagesHeight() const final
HICON getIcon(const std::filesystem::path &pathToIcon) const
HBITMAP getImage(const std::filesystem::path &pathToImage) const
GUI_FRAMEWORK_API_FUNCTION bool drawIconByIndex(const BaseWindow *window, const IconsHolder &holder, int x, int y, uint16_t index)
Draw single icon from holder. Multiple calls doesn't work. Better use BaseWindow drawing.
GUI_FRAMEWORK_API_FUNCTION bool drawImageByPath(const BaseWindow *window, const ImagesHolder &holder, int x, int y, const filesystem::path &pathToImage)
GUI_FRAMEWORK_API_FUNCTION bool drawIconByPath(const BaseWindow *window, const IconsHolder &holder, int x, int y, const filesystem::path &pathToImage)
GUI_FRAMEWORK_API_FUNCTION bool drawImageByIndex(const BaseWindow *window, const ImagesHolder &holder, int x, int y, uint16_t index)
Draw single image from holder. Multiple calls doesn't work. Better use BaseWindow drawing.