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#include "Scrollbar.h"
5
14{
15 Scrollbar _scrollBar;
16
17 long _margin;
18 long _vGap;
19 long _columnMinWidth;
20 long _totalHeightInPixels;
21 long _rowHeight;
22 long _maxVisibleRows;
23 long _firstVisibleRow;
24 long _totalRowCount;
25
31 void Layout();
32
33protected:
34
39 wstring getClassName();
40
45
49 virtual void constructPanel() {};
50
51public:
52
57
61 virtual ~FluidPanel();
62
66 void clear();
67
71 void setFieldHeight(int fieldHeight);
72
78 void setMargin(int margin);
79
84 void setMinColumnWidth(long minWidth);
85
91 void addComponent(Component * component, const wstring& labelText);
92
97
103
104 void onMousePressed(WinHandle hWnd, int x, int y, int clickCount, BOOL shiftPressed, BOOL ctrlPressed);
105 void onMouseReleased(WinHandle hWnd, int x, int y, BOOL shiftPressed, BOOL ctrlPressed);
106 void onMouseMoved(WinHandle hWnd, int x, int y, BOOL shiftPressed, BOOL ctrlPressed);
107 BOOL onMouseWheel(WinHandle hWnd, int x, int y, int delta);
108
109public:
110
111 void scrollBarActivity(__int64 firstVisibleItem);
113
114public:
115
116 static int HEIGHT_TEXTFIELD;
117 static int HEIGHT_COMBOBOX;
118 static int HEIGHT_TEXTAREA;
119 static int HEIGHT_DATETIME;
120 static int HEIGHT_LISTBOX;
121};
HWND WinHandle
Definition Common.h:16
Component()
Constructs a new Component instance.
static int HEIGHT_TEXTAREA
Standard height for text areas.
Definition FluidPanel.h:118
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 scrollBarRepaint()
void addComponent(Component *component, const wstring &labelText)
Adds a component with an associated label text to the panel.
void onMouseMoved(WinHandle hWnd, int x, int y, BOOL shiftPressed, BOOL ctrlPressed)
Called when the mouse is moved within the component.
static int HEIGHT_TEXTFIELD
Standard height for text fields.
Definition FluidPanel.h:116
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:120
virtual void constructPanel()
After this panel is created, constructPanel will be called on the descendent of this class.
Definition FluidPanel.h:49
void clear()
Clears all child components from the panel.
void onMouseReleased(WinHandle hWnd, int x, int y, BOOL shiftPressed, BOOL ctrlPressed)
Called when the mouse button is released within the component.
void onWindowResized()
Handles window resize events.
void scrollBarActivity(__int64 firstVisibleItem)
void windowCreated()
Called when the native window has been created.
void setFieldHeight(int fieldHeight)
Sets the height of the field row, excluding the label.
void onMousePressed(WinHandle hWnd, int x, int y, int clickCount, BOOL shiftPressed, BOOL ctrlPressed)
Called when the mouse is pressed within the component.
static int HEIGHT_COMBOBOX
Standard height for combo boxes.
Definition FluidPanel.h:117
static int HEIGHT_DATETIME
Standard height for date/time pickers.
Definition FluidPanel.h:119
BOOL onMouseWheel(WinHandle hWnd, int x, int y, int delta)
Called when the mouse wheel is used over the component.
Definition Graphics.h:171
PanelBase()
Constructs a PanelBase instance.
Definition Scrollbar.h:14
Definition Scrollbar.h:6