mmsthemebase.h File Reference

#include "mmstools/mmstafffile.h"
#include "mmsgui/mmsguitools.h"

Include dependency graph for mmsthemebase.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Namespaces

namespace  MMSGUI_MMSDIALOG_ATTR
namespace  MMSGUI_BASE_ATTR

Defines

#define MMSTHEMECLASS_INIT_STRING(x)
#define MMSTHEMECLASS_FREE_STRING(x)
#define MMSTHEMECLASS_SET_STRING(x)
#define MMSTHEMECLASS_GET_STRING(x)
#define MMSTHEMECLASS_INIT_STRINGS(x, c)
#define MMSTHEMECLASS_FREE_STRINGS(x, c)
#define MMSTHEMECLASS_SET_STRINGS(x, c, y)
#define MMSTHEMECLASS_GET_STRINGS(x, c, y)
#define MMSTHEMECLASS_UNSET_STRINGS(x, c)
#define MMSTHEMECLASS_INIT_BASIC(x)   this->id.is##x = false;
#define MMSTHEMECLASS_FREE_BASIC(x)   this->id.is##x = false;
#define MMSTHEMECLASS_SET_BASIC(x)
#define MMSTHEMECLASS_GET_BASIC(x)
#define MMSTHEMECLASS_UNSET(x)   this->id.is##x = false;
#define MMSTHEMECLASS_ISSET(x)   return this->id.is##x;
#define startTAFFScan
#define endTAFFScan   } }
#define startTAFFScan_WITHOUT_ID
#define endTAFFScan_WITHOUT_ID   } }
#define ISATTRNAME(aname)   ((strcmp(attrname, GETATTRNAME(aname))==0)?(tafff->convertString2TaffAttributeType(GETATTRTYPE(aname), attrval_str, &attrval_str_valid, &int_val_set, &byte_val_set, p_int_val, attrname, attrid, tafff->getCurrentTagName())):(0))
 macro for widget specific setAttributesFromTAFF() implementation
#define MMSGUI_MMSDIALOG_ATTR_ATTRDESC   { "name", TAFF_ATTRTYPE_STRING }
#define MMSGUI_MMSDIALOG_ATTR_IDS   MMSGUI_MMSDIALOG_ATTR_IDS_name
#define MMSGUI_MMSDIALOG_ATTR_INIT
#define MMSGUI_BASE_ATTR_ATTRDESC
#define MMSGUI_BASE_ATTR_IDS
#define MMSGUI_BASE_ATTR_INIT

Enumerations

enum  MMSALIGNMENT {
  MMSALIGNMENT_NOTSET = 0, MMSALIGNMENT_CENTER, MMSALIGNMENT_LEFT, MMSALIGNMENT_RIGHT,
  MMSALIGNMENT_JUSTIFY, MMSALIGNMENT_TOP_CENTER, MMSALIGNMENT_TOP_LEFT, MMSALIGNMENT_TOP_RIGHT,
  MMSALIGNMENT_TOP_JUSTIFY, MMSALIGNMENT_BOTTOM_CENTER, MMSALIGNMENT_BOTTOM_LEFT, MMSALIGNMENT_BOTTOM_RIGHT,
  MMSALIGNMENT_BOTTOM_JUSTIFY
}
 alignment type, used e.g. for positioning of windows, text in labels or textboxes, ... More...
enum  MMSDIRECTION {
  MMSDIRECTION_NOTSET = 0, MMSDIRECTION_LEFT, MMSDIRECTION_RIGHT, MMSDIRECTION_UP,
  MMSDIRECTION_DOWN, MMSDIRECTION_UP_LEFT, MMSDIRECTION_UP_RIGHT, MMSDIRECTION_DOWN_LEFT,
  MMSDIRECTION_DOWN_RIGHT, MMSDIRECTION_SIZE
}
enum  MMSPOSITION {
  MMSPOSITION_NOTSET = 0, MMSPOSITION_LEFT, MMSPOSITION_RIGHT, MMSPOSITION_TOP,
  MMSPOSITION_BOTTOM, MMSPOSITION_TOP_LEFT, MMSPOSITION_TOP_RIGHT, MMSPOSITION_BOTTOM_LEFT,
  MMSPOSITION_BOTTOM_RIGHT, MMSPOSITION_SIZE
}
enum  ids { MMSGUI_MMSDIALOG_ATTR::MMSGUI_MMSDIALOG_ATTR_IDS }
enum  ids { MMSGUI_BASE_ATTR::MMSGUI_BASE_ATTR_IDS }

Functions

MMSALIGNMENT getAlignmentFromString (string inputstr)
MMSALIGNMENT swapAlignmentHorizontal (MMSALIGNMENT alignment)
MMSDIRECTION getDirectionFromString (string inputstr)
MMSPOSITION getPositionFromString (string inputstr)

Define Documentation

#define endTAFFScan   } }

Definition at line 192 of file mmsthemebase.h.

#define endTAFFScan_WITHOUT_ID   } }

Definition at line 203 of file mmsthemebase.h.

#define ISATTRNAME ( aname   )     ((strcmp(attrname, GETATTRNAME(aname))==0)?(tafff->convertString2TaffAttributeType(GETATTRTYPE(aname), attrval_str, &attrval_str_valid, &int_val_set, &byte_val_set, p_int_val, attrname, attrid, tafff->getCurrentTagName())):(0))

macro for widget specific setAttributesFromTAFF() implementation

Definition at line 207 of file mmsthemebase.h.

#define MMSGUI_BASE_ATTR_ATTRDESC

Value:

{ "name", TAFF_ATTRTYPE_NE_STRING }, \
        { "type", TAFF_ATTRTYPE_NE_STRING }, \
        { "class", TAFF_ATTRTYPE_NE_STRING }, \
        { "size", TAFF_ATTRTYPE_STRING }, \
        { "min_width", TAFF_ATTRTYPE_STRING }, \
        { "min_height", TAFF_ATTRTYPE_STRING }, \
        { "max_width", TAFF_ATTRTYPE_STRING }, \
        { "max_height", TAFF_ATTRTYPE_STRING }, \
        { "show", TAFF_ATTRTYPE_BOOL }

Definition at line 233 of file mmsthemebase.h.

#define MMSGUI_BASE_ATTR_IDS

Value:

MMSGUI_BASE_ATTR_IDS_name, \
        MMSGUI_BASE_ATTR_IDS_type, \
        MMSGUI_BASE_ATTR_IDS_class, \
        MMSGUI_BASE_ATTR_IDS_size, \
        MMSGUI_BASE_ATTR_IDS_min_width, \
        MMSGUI_BASE_ATTR_IDS_min_height, \
        MMSGUI_BASE_ATTR_IDS_max_width, \
        MMSGUI_BASE_ATTR_IDS_max_height, \
        MMSGUI_BASE_ATTR_IDS_show

Definition at line 244 of file mmsthemebase.h.

#define MMSGUI_BASE_ATTR_INIT

Value:

Definition at line 255 of file mmsthemebase.h.

#define MMSGUI_MMSDIALOG_ATTR_ATTRDESC   { "name", TAFF_ATTRTYPE_STRING }

Definition at line 214 of file mmsthemebase.h.

#define MMSGUI_MMSDIALOG_ATTR_IDS   MMSGUI_MMSDIALOG_ATTR_IDS_name

Definition at line 217 of file mmsthemebase.h.

#define MMSGUI_MMSDIALOG_ATTR_INIT

Value:

Definition at line 220 of file mmsthemebase.h.

#define MMSTHEMECLASS_FREE_BASIC (  )     this->id.is##x = false;

Definition at line 163 of file mmsthemebase.h.

#define MMSTHEMECLASS_FREE_STRING (  ) 

Value:

if (this->ed.x) delete this->ed.x; \
    this->ed.x = NULL; \
    this->id.is##x = false;

Definition at line 113 of file mmsthemebase.h.

#define MMSTHEMECLASS_FREE_STRINGS ( x,
 ) 

Value:

for (int cc=0;cc<c;cc++) { \
        if (this->ed.x[cc]) delete this->ed.x[cc]; \
        this->ed.x[cc] = NULL; \
    } \
    this->id.is##x = false;

Definition at line 135 of file mmsthemebase.h.

#define MMSTHEMECLASS_GET_BASIC (  ) 

Value:

if (!this->id.is##x) return false; \
    x = this->id.x; \
    return true;

Definition at line 170 of file mmsthemebase.h.

#define MMSTHEMECLASS_GET_STRING (  ) 

Value:

if (!this->id.is##x) return false; \
    x = *(this->ed.x); \
    return true;

Definition at line 123 of file mmsthemebase.h.

#define MMSTHEMECLASS_GET_STRINGS ( x,
c,
 ) 

Value:

if (!this->id.is##x) return false; \
    if (!this->ed.x[c]) return false; \
    y = *(this->ed.x[c]); \
    return true;

Definition at line 147 of file mmsthemebase.h.

#define MMSTHEMECLASS_INIT_BASIC (  )     this->id.is##x = false;

Definition at line 160 of file mmsthemebase.h.

#define MMSTHEMECLASS_INIT_STRING (  ) 

Value:

this->ed.x = NULL; \
    this->id.is##x = false;

Definition at line 109 of file mmsthemebase.h.

#define MMSTHEMECLASS_INIT_STRINGS ( x,
 ) 

Value:

for (int cc=0;cc<c;cc++) \
        this->ed.x[cc] = NULL; \
    this->id.is##x = false;

Definition at line 130 of file mmsthemebase.h.

#define MMSTHEMECLASS_ISSET (  )     return this->id.is##x;

Definition at line 179 of file mmsthemebase.h.

#define MMSTHEMECLASS_SET_BASIC (  ) 

Value:

this->id.x = x; \
    this->id.is##x = true;

Definition at line 166 of file mmsthemebase.h.

#define MMSTHEMECLASS_SET_STRING (  ) 

Value:

if (!this->ed.x) this->ed.x = new string(x); \
    else *(this->ed.x) = x; \
    this->id.is##x = true;

Definition at line 118 of file mmsthemebase.h.

#define MMSTHEMECLASS_SET_STRINGS ( x,
c,
 ) 

Value:

if (!this->ed.x[c]) this->ed.x[c] = new string(y); \
    else *(this->ed.x[c]) = y; \
    this->id.is##x = true;

Definition at line 142 of file mmsthemebase.h.

#define MMSTHEMECLASS_UNSET (  )     this->id.is##x = false;

Definition at line 176 of file mmsthemebase.h.

#define MMSTHEMECLASS_UNSET_STRINGS ( x,
 ) 

Value:

for (int cc=0;cc<c;cc++) \
        if (this->ed.x[cc]) *(this->ed.x[cc]) = ""; \
    this->id.is##x = false;

Definition at line 153 of file mmsthemebase.h.

#define startTAFFScan

Value:

{ bool first=true; int attrid; char *attrval_str; int attrval_int; \
    while (1) { \
        if (first) { attrid=tafff->getFirstAttribute(&attrval_str, &attrval_int); first=false; } else \
        attrid=tafff->getNextAttribute(&attrval_str, &attrval_int); \
        if (attrid<0) break;

Definition at line 185 of file mmsthemebase.h.

#define startTAFFScan_WITHOUT_ID

Value:

{ bool first=true; int attrid; char *attrval_str; int attrval_int; char *attrname; \
    while (1) { \
        if (first) { attrid=tafff->getFirstAttribute(&attrval_str, &attrval_int, &attrname); first=false; } else \
        attrid=tafff->getNextAttribute(&attrval_str, &attrval_int, &attrname); \
        while((attrid>=0)&&(attrid!=MMSTAFF_ATTR_WITHOUT_ID)) attrid=tafff->getNextAttribute(&attrval_str,&attrval_int,&attrname); \
        if (attrid<0) break;

Definition at line 195 of file mmsthemebase.h.


Enumeration Type Documentation

alignment type, used e.g. for positioning of windows, text in labels or textboxes, ...

Enumerator:
MMSALIGNMENT_NOTSET  not set
MMSALIGNMENT_CENTER  centered, horizontal and vertical
MMSALIGNMENT_LEFT  left aligned, vertical centered
MMSALIGNMENT_RIGHT  right aligned, vertical centered
MMSALIGNMENT_JUSTIFY  horizontal justified, vertical centered
MMSALIGNMENT_TOP_CENTER  horizontal centered, top aligned
MMSALIGNMENT_TOP_LEFT  left and top aligned
MMSALIGNMENT_TOP_RIGHT  right and top aligned
MMSALIGNMENT_TOP_JUSTIFY  horizontal justified, top aligned
MMSALIGNMENT_BOTTOM_CENTER  horizontal centered, bottom aligned
MMSALIGNMENT_BOTTOM_LEFT  left and bottom aligned
MMSALIGNMENT_BOTTOM_RIGHT  right and bottom aligned
MMSALIGNMENT_BOTTOM_JUSTIFY  horizontal justified, bottom aligned

Definition at line 42 of file mmsthemebase.h.

Enumerator:
MMSDIRECTION_NOTSET 
MMSDIRECTION_LEFT 
MMSDIRECTION_RIGHT 
MMSDIRECTION_UP 
MMSDIRECTION_DOWN 
MMSDIRECTION_UP_LEFT 
MMSDIRECTION_UP_RIGHT 
MMSDIRECTION_DOWN_LEFT 
MMSDIRECTION_DOWN_RIGHT 
MMSDIRECTION_SIZE 

Definition at line 75 of file mmsthemebase.h.

Enumerator:
MMSPOSITION_NOTSET 
MMSPOSITION_LEFT 
MMSPOSITION_RIGHT 
MMSPOSITION_TOP 
MMSPOSITION_BOTTOM 
MMSPOSITION_TOP_LEFT 
MMSPOSITION_TOP_RIGHT 
MMSPOSITION_BOTTOM_LEFT 
MMSPOSITION_BOTTOM_RIGHT 
MMSPOSITION_SIZE 

Definition at line 92 of file mmsthemebase.h.


Function Documentation

MMSALIGNMENT getAlignmentFromString ( string  inputstr  ) 

Definition at line 35 of file mmsthemebase.cpp.

MMSDIRECTION getDirectionFromString ( string  inputstr  ) 

Definition at line 87 of file mmsthemebase.cpp.

MMSPOSITION getPositionFromString ( string  inputstr  ) 

Definition at line 114 of file mmsthemebase.cpp.

MMSALIGNMENT swapAlignmentHorizontal ( MMSALIGNMENT  alignment  ) 

Definition at line 68 of file mmsthemebase.cpp.