SavvyUI C++ UI Library
Loading...
Searching...
No Matches
Wizard.h
Go to the documentation of this file.
1#pragma once
2
3#include "CardPanel.h"
4#include "Button.h"
5
7{
8public:
9
10 virtual void onFinish() = 0;
11 virtual void onCancel() = 0;
12};
13
17class Wizard: public Component, public ActionListener
18{
19 WinHandle _hWnd;
20 CardPanel _cardPanel;
21
22 WizardActionListener* _listener;
23
24 Button _backButton, _nextButton;
25
26 long _buttonsRowHeight;
27
28 vector<Component *> _panels;
29 long _currentIndex;
30
31protected:
41 BOOL getCreateWindowOptions(wstring& title, UINT& widownStyles, wstring& wndClassName, BOOL& isCustomWndProc);
42
47
48public:
53
57 virtual ~Wizard();
58
60
64 void clear();
65
72 void addPanel(Component* component);
73
78
84 void onPaint(Graphics *g);
85
86 void onAction(const ActionEvent& ev);
87};
HWND WinHandle
Definition Common.h:16
Definition EventListeners.h:38
Definition EventListeners.h:46
A clickable UI component representing a button with customizable text and type.
Definition Button.h:13
A UI component that manages multiple "cards", displaying only one at a time.
Definition CardPanel.h:27
Component()
Constructs a new Component instance.
Definition Graphics.h:171
Definition Wizard.h:7
virtual void onCancel()=0
virtual void onFinish()=0
virtual ~Wizard()
Destructor for the Wizard component.
BOOL getCreateWindowOptions(wstring &title, UINT &widownStyles, wstring &wndClassName, BOOL &isCustomWndProc)
Retrieves window creation options.
void addPanel(Component *component)
Adds a new tab with the specified title and component.
void clear()
Clears all panels.
void windowCreated()
Called when the window is created.
void onAction(const ActionEvent &ev)
Wizard()
Constructs a new Wizard component.
void onWindowResized()
Handles window resize events.
void setListener(WizardActionListener *l)
void onPaint(Graphics *g)
Paints the Wizard including panels and active content.