#if !defined RQSTATUSBAR_H
#define RQSTATUSBAR_H
#include <windows.h>
#include "rqfont.h"
#include "rqcontrol.h"
#include "rqdefs.h"
typedef struct
{
int width;
char* caption;
} PanelType;
class RQStatusBar: public RQControl
{
private:
int panelCount;
int* panelWidths;
PanelType* panels;
void updateParts();
protected:
HWND handle;
char *simpleText;
void messageHandler(HWND, UINT, WPARAM, LPARAM);
HWND getHandle() { return handle; }
RQControl* getParent() { return parent; }
public:
RQStatusBar();
~RQStatusBar();
RQFont font;
void setParent(RQControl&);
void setSimpleText(char*);
char const* getSimpleText();
void setPanelWidth(int index, int width);
int getPanelWidth(int index) { return panels[index].width; }
void setPanelCaption(int index, char const* caption);
char const* getPanelCaption(int index) { return panels[index].caption; }
void addPanel(char*);
void (*onResize)(RQStatusBar&);
};
#endif
|