diff dw.hpp @ 2919:e609aa6a5b93

C++: Attempt to implement page 2 rendering... Getting a crash on Mac, but want to commit before I sleep.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 28 Dec 2022 11:23:51 +0000
parents 77e5d6743013
children c6b699a441fe
line wrap: on
line diff
--- a/dw.hpp	Wed Dec 28 11:22:55 2022 +0000
+++ b/dw.hpp	Wed Dec 28 11:23:51 2022 +0000
@@ -663,6 +663,7 @@
     void GetTextExtents(const char *text, int *width, int *height) { dw_font_text_extents_get(hwnd, DW_NULL, text, width, height); }
     char *GetFont() { return dw_window_get_font(hwnd); }
     void Redraw() { dw_render_redraw(hwnd); }
+    void Flush() { dw_flush(); }
 #ifdef DW_LAMBDA
     void ConnectExpose(std::function<int(DWExpose *)> userfunc)
 #else
@@ -770,7 +771,7 @@
     };
 };
 
-class Pixmap : public Drawable, public Handle
+class Pixmap final : public Drawable, public Handle
 {
 private:
     void SetHPIXMAP(HPIXMAP newpixmap) { 
@@ -1673,7 +1674,7 @@
     HICN LoadIcon(const char *filename) { return dw_icon_load_from_file(filename); }
     HICN LoadIcon(const char *data, int len) { return dw_icon_load_from_data(data, len); }
     void FreeIcon(HICN icon) { dw_icon_free(icon); }
-    void TaskBarInsert(Widget *handle, HICN icon, char *bubbletext) { dw_taskbar_insert(handle ? handle->GetHWND() : DW_NOHWND, icon, bubbletext); }
+    void TaskBarInsert(Widget *handle, HICN icon,  const char *bubbletext) { dw_taskbar_insert(handle ? handle->GetHWND() : DW_NOHWND, icon, bubbletext); }
     void TaskBarDelete(Widget *handle, HICN icon) { dw_taskbar_delete(handle ? handle->GetHWND() : DW_NOHWND, icon); }
 };