CTheme

#include "Theme.h"


Description

Theme class.

Class is an singleton.


Private variables

Type Name Description
UnicodeString ActiveTheme Path to active theme

Private static variables

Type Name Description
static CTheme* Instance Object instance

Private methods

Type Name Description
CTheme() Constructor

Private static methods

Type Name Description
static INT_PTR __stdcall ThemeChanged(WPARAM wParam, LPARAM lParam) Function that handles theme change event
static INT_PTR __stdcall ThemeInfo(WPARAM wParam, LPARAM lParam) Function that handles theme info event if plugin was enabled in AQQ settings
static INT_PTR __stdcall ThemeStart(WPARAM wParam, LPARAM lParam) Function that handles theme info event on AQQ start

Public methods

Type Name Description
~CTheme() Destructor
bool SkinEnabled() Advanced window skinning is enabled
bool AnimateWindows() Window animations are enabled
bool Glowing() Glowing is enabled
void Apply(int Mode) Function activates selected theme. In Mode parameter we have to select refresh mode. 0 fast refresh; 1 full refresh
void Refresh() Function refreshes active theme
void Set(UnicodeString Directory) Function selects given theme. In Directory parameter we have to give path to theme directory. After that we need to call Apply() function
void ChangeColor(int Hue, int Saturation, int Brightness) Function sets the specified theme colors
int Hue() Function gets Hue value from AQQ
int Saturation() Function gets Saturation value from AQQ
int Brightness() Function gets Brightness value from AQQ
UnicodeString GetActiveTheme() Function returns active theme path

Public static methods

Type Name Description
static CTheme* instance() Function returns object instance
static void InitInstance() Function initializes object instance. Call it in Load() function
static void ResetInstance() Function destroys object instance. Call it in Unload() function

Example

extern "C" INT_PTR __declspec(dllexport) __stdcall Load(PPluginLink Link)
{
    CPluginLink::instance()->SetLink(*Link);
    CTheme::InitInstance();
    AQQ::Functions::ShowMessage(0, CTheme::instance->GetActiveTheme());
    return 0;
}

extern "C" INT_PTR __declspec(dllexport) __stdcall Unload()
{
   CTheme::ResetInstance();
    return 0;
}