Commit 1e632ead authored by claes's avatar claes

Scale type in move dynamics

parent 4744ddf2
...@@ -853,6 +853,9 @@ static attrnav_sEnumElement elem_anim_sequence[] = { ...@@ -853,6 +853,9 @@ static attrnav_sEnumElement elem_anim_sequence[] = {
static attrnav_sEnumElement elem_limit_type[] = { static attrnav_sEnumElement elem_limit_type[] = {
{ (int) ge_eLimitType_Gt, "GreaterThan"}, { (int) ge_eLimitType_Gt, "GreaterThan"},
{ (int) ge_eLimitType_Lt, "LessThan"}, { (int) ge_eLimitType_Lt, "LessThan"},
{ (int) ge_eLimitType_Ge, "GreaterEqual"},
{ (int) ge_eLimitType_Le, "LessEqual"},
{ (int) ge_eLimitType_Eq, "Equal"},
{ 0, ""}}; { 0, ""}};
static attrnav_sEnumElement elem_relief[] = { static attrnav_sEnumElement elem_relief[] = {
...@@ -869,6 +872,14 @@ static attrnav_sEnumElement elem_text_size[] = { ...@@ -869,6 +872,14 @@ static attrnav_sEnumElement elem_text_size[] = {
{ (int) glow_eTextSize_24, "24"}, { (int) glow_eTextSize_24, "24"},
{ 0, ""}}; { 0, ""}};
static attrnav_sEnumElement elem_scale_type[] = {
{ (int) glow_eScaleType_LowerLeft, "UpperLeft"},
{ (int) glow_eScaleType_LowerRight, "UpperRight"},
{ (int) glow_eScaleType_UpperLeft, "LowerLeft"},
{ (int) glow_eScaleType_UpperRight, "LowerRight"},
{ (int) glow_eScaleType_Center, "Center"},
{ 0, ""}};
static attrnav_sEnum enum_types[] = { static attrnav_sEnum enum_types[] = {
{ (int) glow_eType_Direction, (attrnav_sEnumElement *) &elem_direction}, { (int) glow_eType_Direction, (attrnav_sEnumElement *) &elem_direction},
{ (int) glow_eType_Color, (attrnav_sEnumElement *) &elem_color}, { (int) glow_eType_Color, (attrnav_sEnumElement *) &elem_color},
...@@ -881,6 +892,7 @@ static attrnav_sEnum enum_types[] = { ...@@ -881,6 +892,7 @@ static attrnav_sEnum enum_types[] = {
{ (int) glow_eType_Relief, (attrnav_sEnumElement *) &elem_relief}, { (int) glow_eType_Relief, (attrnav_sEnumElement *) &elem_relief},
{ (int) glow_eType_TextSize, (attrnav_sEnumElement *) &elem_text_size}, { (int) glow_eType_TextSize, (attrnav_sEnumElement *) &elem_text_size},
{ (int) glow_eType_InputFocusMark, (attrnav_sEnumElement *) &elem_input_focus_mark}, { (int) glow_eType_InputFocusMark, (attrnav_sEnumElement *) &elem_input_focus_mark},
{ (int) ge_eAttrType_ScaleType, (attrnav_sEnumElement *) &elem_scale_type},
{ 0, NULL}}; { 0, NULL}};
static attrnav_sEnum mask_types[] = { static attrnav_sEnum mask_types[] = {
...@@ -950,6 +962,7 @@ int attrnav_attr_string_to_value( int type_id, char *value_str, ...@@ -950,6 +962,7 @@ int attrnav_attr_string_to_value( int type_id, char *value_str,
case ge_eAttrType_LimitType: case ge_eAttrType_LimitType:
case ge_eAttrType_InstanceMask: case ge_eAttrType_InstanceMask:
case ge_eAttrType_InputFocus: case ge_eAttrType_InputFocus:
case ge_eAttrType_ScaleType:
{ {
if ( sscanf( value_str, "%u", (int *)buffer_ptr) != 1) if ( sscanf( value_str, "%u", (int *)buffer_ptr) != 1)
return ATTRNAV__INPUT_SYNTAX; return ATTRNAV__INPUT_SYNTAX;
...@@ -1023,6 +1036,7 @@ void attrnav_attrvalue_to_string( int type_id, void *value_ptr, ...@@ -1023,6 +1036,7 @@ void attrnav_attrvalue_to_string( int type_id, void *value_ptr,
case glow_eType_TextSize: case glow_eType_TextSize:
case ge_eAttrType_AnimSequence: case ge_eAttrType_AnimSequence:
case ge_eAttrType_LimitType: case ge_eAttrType_LimitType:
case ge_eAttrType_ScaleType:
{ {
attrnav_sEnumElement *elem_p; attrnav_sEnumElement *elem_p;
attrnav_sEnum *enum_p; attrnav_sEnum *enum_p;
...@@ -2084,6 +2098,7 @@ ItemLocal::ItemLocal( AttrNav *attrnav, char *item_name, char *attr, ...@@ -2084,6 +2098,7 @@ ItemLocal::ItemLocal( AttrNav *attrnav, char *item_name, char *attr,
case ge_eAttrType_LimitType: case ge_eAttrType_LimitType:
case ge_eAttrType_InstanceMask: case ge_eAttrType_InstanceMask:
case ge_eAttrType_InputFocus: case ge_eAttrType_InputFocus:
case ge_eAttrType_ScaleType:
if ( !noedit) if ( !noedit)
{ {
brow_SetAnnotPixmap( node, 0, attrnav->brow->pixmap_attrarray); brow_SetAnnotPixmap( node, 0, attrnav->brow->pixmap_attrarray);
......
This diff is collapsed.
...@@ -45,7 +45,10 @@ extern "C" { ...@@ -45,7 +45,10 @@ extern "C" {
//! Values for a limit type. //! Values for a limit type.
typedef enum { typedef enum {
ge_eLimitType_Gt, //!< Greater then. ge_eLimitType_Gt, //!< Greater then.
ge_eLimitType_Lt //!< Less then. ge_eLimitType_Lt, //!< Less then.
ge_eLimitType_Ge, //!< Greater then or equal.
ge_eLimitType_Le, //!< Less then or equal.
ge_eLimitType_Eq //!< Equal.
} ge_eLimitType; } ge_eLimitType;
//! Mask for initial and first input focus. //! Mask for initial and first input focus.
...@@ -275,6 +278,8 @@ extern "C" { ...@@ -275,6 +278,8 @@ extern "C" {
ge_eSave_DigText_low_text = 1101, ge_eSave_DigText_low_text = 1101,
ge_eSave_Value_attribute = 1200, ge_eSave_Value_attribute = 1200,
ge_eSave_Value_format = 1201, ge_eSave_Value_format = 1201,
ge_eSave_Value_instance = 1202,
ge_eSave_Value_instance_mask = 1203,
ge_eSave_ValueInput_attribute = 1300, ge_eSave_ValueInput_attribute = 1300,
ge_eSave_ValueInput_format = 1301, ge_eSave_ValueInput_format = 1301,
ge_eSave_ValueInput_min_value = 1302, ge_eSave_ValueInput_min_value = 1302,
...@@ -293,6 +298,7 @@ extern "C" { ...@@ -293,6 +298,7 @@ extern "C" {
ge_eSave_Move_scale_x_attribute = 1505, ge_eSave_Move_scale_x_attribute = 1505,
ge_eSave_Move_scale_y_attribute = 1506, ge_eSave_Move_scale_y_attribute = 1506,
ge_eSave_Move_scale_factor = 1507, ge_eSave_Move_scale_factor = 1507,
ge_eSave_Move_scale_type = 1508,
ge_eSave_AnalogShift_attribute = 1700, ge_eSave_AnalogShift_attribute = 1700,
ge_eSave_DigShift_attribute = 1800, ge_eSave_DigShift_attribute = 1800,
ge_eSave_Animation_attribute = 1900, ge_eSave_Animation_attribute = 1900,
...@@ -1020,13 +1026,14 @@ class GeValue : public GeDynElem { ...@@ -1020,13 +1026,14 @@ class GeValue : public GeDynElem {
int annot_typeid; int annot_typeid;
int annot_size; int annot_size;
GeValue( GeDyn *e_dyn) : GeValue( GeDyn *e_dyn, ge_mInstance e_instance = ge_mInstance_1) :
GeDynElem(e_dyn, ge_mDynType_Value, (ge_mActionType) 0, ge_eDynPrio_Value), GeDynElem(e_dyn, ge_mDynType_Value, (ge_mActionType) 0, ge_eDynPrio_Value),
annot_typeid(0), annot_size(0) annot_typeid(0), annot_size(0)
{ strcpy( attribute, ""); strcpy( format, "");} { strcpy( attribute, ""); strcpy( format, ""); instance = e_instance;}
GeValue( const GeValue& x) : GeValue( const GeValue& x) :
GeDynElem(x.dyn,x.dyn_type,x.action_type,x.prio) GeDynElem(x.dyn,x.dyn_type,x.action_type,x.prio)
{ strcpy( attribute, x.attribute); strcpy( format, x.format);} { strcpy( attribute, x.attribute); strcpy( format, x.format);
instance = x.instance; instance_mask = x.instance_mask;}
void get_attributes( attr_sItem *attrinfo, int *item_count); void get_attributes( attr_sItem *attrinfo, int *item_count);
int get_transtab( char **tt); int get_transtab( char **tt);
void save( ofstream& fp); void save( ofstream& fp);
...@@ -1156,6 +1163,7 @@ class GeMove : public GeDynElem { ...@@ -1156,6 +1163,7 @@ class GeMove : public GeDynElem {
double y_offset; double y_offset;
double factor; double factor;
double scale_factor; double scale_factor;
glow_eScaleType scale_type;
pwr_tFloat32 *move_x_p; pwr_tFloat32 *move_x_p;
pwr_tSubid move_x_subid; pwr_tSubid move_x_subid;
...@@ -1184,10 +1192,13 @@ class GeMove : public GeDynElem { ...@@ -1184,10 +1192,13 @@ class GeMove : public GeDynElem {
bool first_scan; bool first_scan;
double x_orig; double x_orig;
double y_orig; double y_orig;
double width_orig;
double height_orig;
GeMove( GeDyn *e_dyn) : GeMove( GeDyn *e_dyn) :
GeDynElem(e_dyn, ge_mDynType_Move, (ge_mActionType) 0, ge_eDynPrio_Move), GeDynElem(e_dyn, ge_mDynType_Move, (ge_mActionType) 0, ge_eDynPrio_Move),
x_offset(0), y_offset(0), factor(1), scale_factor(1) x_offset(0), y_offset(0), factor(1), scale_factor(1),
scale_type(glow_eScaleType_LowerLeft)
{ {
strcpy( move_x_attribute, ""); strcpy( move_x_attribute, "");
strcpy( move_y_attribute, ""); strcpy( move_y_attribute, "");
...@@ -1196,7 +1207,8 @@ class GeMove : public GeDynElem { ...@@ -1196,7 +1207,8 @@ class GeMove : public GeDynElem {
} }
GeMove( const GeMove& x) : GeMove( const GeMove& x) :
GeDynElem(x.dyn,x.dyn_type,x.action_type,x.prio), x_offset(x.x_offset), GeDynElem(x.dyn,x.dyn_type,x.action_type,x.prio), x_offset(x.x_offset),
y_offset(x.y_offset), factor(x.factor), scale_factor(x.scale_factor) y_offset(x.y_offset), factor(x.factor), scale_factor(x.scale_factor),
scale_type(x.scale_type)
{ {
strcpy( move_x_attribute, x.move_x_attribute); strcpy( move_x_attribute, x.move_x_attribute);
strcpy( move_y_attribute, x.move_y_attribute); strcpy( move_y_attribute, x.move_y_attribute);
......
...@@ -64,7 +64,8 @@ typedef enum { ...@@ -64,7 +64,8 @@ typedef enum {
ge_eAttrType_LimitType = 1004, //!< Limit type (Gt or Lt). ge_eAttrType_LimitType = 1004, //!< Limit type (Gt or Lt).
ge_eAttrType_InstanceMask = 1005, //!< Instance mask. ge_eAttrType_InstanceMask = 1005, //!< Instance mask.
ge_eAttrType_InputFocus = 1006, //!< Initial input focus mask. ge_eAttrType_InputFocus = 1006, //!< Initial input focus mask.
ge_eAttrType_Dyn = 1007 //!< Dynamic data. ge_eAttrType_Dyn = 1007, //!< Dynamic data.
ge_eAttrType_ScaleType = 1008 //!< Scale type.
} ge_eAttrType; } ge_eAttrType;
//! Graph mode. //! Graph mode.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment