comparison dw.hpp @ 2871:4b7c4cd7a11d

OS2: Fix building the C++ bindings on OS/2 with GCC.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 18 Dec 2022 21:59:12 +0000
parents 7b4e30c19757
children e62fc9b3b09c
comparison
equal deleted inserted replaced
2870:7b4e30c19757 2871:4b7c4cd7a11d
42 // Box class is a packable object 42 // Box class is a packable object
43 class Box : public Widget 43 class Box : public Widget
44 { 44 {
45 public: 45 public:
46 void PackStart(Widget *item, int width, int height, int hsize, int vsize, int pad) { 46 void PackStart(Widget *item, int width, int height, int hsize, int vsize, int pad) {
47 dw_box_pack_start(hwnd, item ? item->GetHWND() : nullptr, width, height, hsize, vsize, pad); } 47 dw_box_pack_start(hwnd, item ? item->GetHWND() : DW_NOHWND, width, height, hsize, vsize, pad); }
48 void PackEnd(Widget *item, int width, int height, int hsize, int vsize, int pad) { 48 void PackEnd(Widget *item, int width, int height, int hsize, int vsize, int pad) {
49 dw_box_pack_end(hwnd, item ? item->GetHWND() : nullptr, width, height, hsize, vsize, pad); } 49 dw_box_pack_end(hwnd, item ? item->GetHWND() : DW_NOHWND, width, height, hsize, vsize, pad); }
50 void PackAtIndex(Widget *item, int index, int width, int height, int hsize, int vsize, int pad) { 50 void PackAtIndex(Widget *item, int index, int width, int height, int hsize, int vsize, int pad) {
51 dw_box_pack_at_index(hwnd, item ? item->GetHWND() : nullptr, index, width, height, hsize, vsize, pad); } 51 dw_box_pack_at_index(hwnd, item ? item->GetHWND() : DW_NOHWND, index, width, height, hsize, vsize, pad); }
52 Widget *UnpackAtIndex(int index) { HWND widget = dw_box_unpack_at_index(hwnd, index); 52 Widget *UnpackAtIndex(int index) { HWND widget = dw_box_unpack_at_index(hwnd, index);
53 void *classptr = widget ? dw_window_get_data(widget, "_dw_classptr") : nullptr; 53 void *classptr = widget ? dw_window_get_data(widget, "_dw_classptr") : nullptr;
54 return reinterpret_cast<Widget *>(classptr); 54 return reinterpret_cast<Widget *>(classptr);
55 } 55 }
56 }; 56 };