SavvyUI C++ UI Library
Loading...
Searching...
No Matches
Accordion.h
Go to the documentation of this file.
1#pragma once
2
3#include "Component.h"
4#include "Button.h"
5
7{
8public:
9
12
13 wstring _title;
14 UINT _id;
16};
17
25class Accordion : public Component, public ActionListener
26{
27 BOOL _singleSelection;
28 vector<AccordionPanel> _panels;
29 long _selectedPanelId;
30
31protected:
41 BOOL getCreateWindowOptions(wstring& title, UINT& widownStyles, wstring& wndClassName, BOOL& isCustomWndProc);
42
47
48public:
53
57 virtual ~Accordion();
58
65 void addPanel(const wstring& title, Component *component);
66
72 void onPaint(Graphics *g);
73
78
79public:
85 void onAction(const ActionEvent& ev);
86};
virtual ~Accordion()
Destructs the Accordion object and cleans up resources.
void addPanel(const wstring &title, Component *component)
Adds a new panel to the Accordion.
void onWindowResized()
Responds to the window being resized.
void onPaint(Graphics *g)
Handles the painting of the Accordion.
BOOL getCreateWindowOptions(wstring &title, UINT &widownStyles, wstring &wndClassName, BOOL &isCustomWndProc)
Prepares window creation options such as title, styles, and class name.
void windowCreated()
Called after the window has been created to perform any initialization.
void onAction(const ActionEvent &ev)
Handles action events triggered by the Accordion or its components.
Accordion()
Constructs an Accordion object.
Definition Accordion.h:7
BOOL _isVisible
Definition Accordion.h:15
Button _button
Definition Accordion.h:10
UINT _id
Definition Accordion.h:14
wstring _title
Definition Accordion.h:13
Component * _component
Definition Accordion.h:11
Definition EventListeners.h:38
Definition EventListeners.h:46
A clickable UI component representing a button with customizable text and type.
Definition Button.h:13
Base class for all UI components providing window creation, event handling, and listener management.
Definition Component.h:32
Component()
Constructs a new Component instance.
Definition Graphics.h:161