comparison foosdk/sdk/foobar2000/helpers/dialog_resize_helper.h @ 1:20d02a178406 default tip

*: check in everything else yay
author Paper <paper@tflc.us>
date Mon, 05 Jan 2026 02:15:46 -0500
parents
children
comparison
equal deleted inserted replaced
0:e9bb126753e7 1:20d02a178406
1 #pragma once
2
3 #ifdef FOOBAR2000_DESKTOP_WINDOWS
4
5 #include <libPPUI/CDialogResizeHelperCompat.h>
6
7 // Legacy class referenced by old code
8 // Do not use in new code, use libPPUI instead
9 class dialog_resize_helper : public CDialogResizeHelperCompat
10 {
11 pfc::array_t<RECT> rects;
12 RECT orig_client;
13 HWND parent;
14 HWND sizegrip;
15 unsigned min_x,min_y,max_x,max_y;
16
17 pfc::array_t<param> m_table;
18
19 void set_parent(HWND wnd);
20 void reset();
21 void on_wm_size();
22 public:
23 inline void set_min_size(unsigned x,unsigned y) {min_x = x; min_y = y;}
24 inline void set_max_size(unsigned x,unsigned y) {max_x = x; max_y = y;}
25 void add_sizegrip();
26
27 //the old way
28 bool process_message(HWND wnd,UINT msg,WPARAM wp,LPARAM lp);
29
30 //ATL-compatible
31 BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult);
32
33 dialog_resize_helper(const param * src,unsigned count,unsigned p_min_x,unsigned p_min_y,unsigned p_max_x,unsigned p_max_y);
34
35 ~dialog_resize_helper();
36
37 PFC_CLASS_NOT_COPYABLE_EX(dialog_resize_helper);
38 };
39
40 #endif // FOOBAR2000_DESKTOP_WINDOWS