SavvyUI C++ UI Library
Loading...
Searching...
No Matches
FluidPanel.h
Go to the documentation of this file.
1#pragma once
2
3#include "PanelBase.h"
4
12class FluidPanel : public PanelBase
13{
14 long _margin;
15 long _vGap;
16 long _minWidth;
17 long _totalHeightInPixels;
18 long _rowHeight;
19 long _viewHeight;
20 long _maxVisibleRows;
21 long _firstVisibleRow;
22
28 void Layout();
29
30protected:
31
36 wstring getClassName();
37
42
43public:
44
49
53 virtual ~FluidPanel();
54
58 void clear();
59
63 void setFieldHeight(int fieldHeight);
64
70 void setMargin(int margin);
71
76 void setMinColumnWidth(long minWidth);
77
83 void addComponent(Component * component, const wstring& labelText);
84
89
94 void onPaint(Graphics *g);
95
104 BOOL onMouseWheel(WinHandle hWnd, int x, int y, int delta);
105
113 BOOL getScrollingInfo(__int64& scrollMin, __int64& scrollMax, __int64& pageSize);
114
119 void setScrollbarTopOffset(__int64 firstVisibleRow);
120
121public:
122
123 static int HEIGHT_TEXTFIELD;
124 static int HEIGHT_COMBOBOX;
125 static int HEIGHT_TEXTAREA;
126 static int HEIGHT_DATETIME;
127 static int HEIGHT_LISTBOX;
128};
HWND WinHandle
Definition Common.h:16
Component()
Constructs a new Component instance.
static int HEIGHT_TEXTAREA
Standard height for text areas.
Definition FluidPanel.h:125
BOOL getScrollingInfo(__int64 &scrollMin, __int64 &scrollMax, __int64 &pageSize)
Retrieves scrolling information.
virtual ~FluidPanel()
Destructor.
wstring getClassName()
Returns the class name for the component.
void setMargin(int margin)
Sets the left, top, right, and bottom margins.
FluidPanel()
Constructor.
void addComponent(Component *component, const wstring &labelText)
Adds a component with an associated label text to the panel.
static int HEIGHT_TEXTFIELD
Standard height for text fields.
Definition FluidPanel.h:123
void setScrollbarTopOffset(__int64 firstVisibleRow)
Sets the scroll position by specifying the first visible row.
void onPaint(Graphics *g)
Handles paint events.
void setMinColumnWidth(long minWidth)
Sets the minimum width for columns.
static int HEIGHT_LISTBOX
Standard height for list boxes.
Definition FluidPanel.h:127
void clear()
Clears all child components from the panel.
void onWindowResized()
Handles window resize events.
void windowCreated()
Called when the native window has been created.
void setFieldHeight(int fieldHeight)
Sets the height of the field row, excluding the label.
static int HEIGHT_COMBOBOX
Standard height for combo boxes.
Definition FluidPanel.h:124
static int HEIGHT_DATETIME
Standard height for date/time pickers.
Definition FluidPanel.h:126
BOOL onMouseWheel(WinHandle hWnd, int x, int y, int delta)
Handles mouse wheel events for scrolling.
Definition Graphics.h:161
PanelBase()
Constructs a PanelBase instance.