Commit acf2a1bc authored by Claes Sjofors's avatar Claes Sjofors

Xtt opplace, starup applications added, and layout option hide navigator

parent ce3413a5
......@@ -129,6 +129,17 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! The graphs of the XttGraph objects specified in this list
! will be opened automatically when the operator place is started.
!*/
Object AutoStart $Attribute 45
Body SysBody
Attr TypeRef = "pwrs:Type-$AttrRef"
Attr Flags |= PWR_MASK_ARRAY
Attr Elements = 25
EndBody
EndObject
!/**
! Each attribute specifies the complete name of a Form or
! Graph object which is to be activated by a function
! button in the operator window. The name has to be
......@@ -668,6 +679,286 @@ SObject pwrb:Class
EndObject
EndObject
EndObject
Object ConnectAutoStart $MenuCascade
Body SysBody
Attr ButtonName = "Connect AutoStart"
EndBody
Object AutoStart1 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 0"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[0]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[0]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart2 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 1"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[1]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[1]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart3 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 2"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[2]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[2]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart4 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 3"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[3]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[3]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart5 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 4"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[4]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[4]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart6 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 5"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[5]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[5]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart7 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 6"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[6]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[6]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart8 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 7"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[7]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[7]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart9 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 8"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[8]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[8]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart10 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 9"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[9]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[9]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart11 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 10"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[10]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[10]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart12 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 11"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[11]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[11]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart13 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 12"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[12]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[12]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart14 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 13"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[13]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[13]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart15 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 14"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[14]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[14]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart16 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 15"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[15]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[15]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart17 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 16"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[16]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[16]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart18 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 17"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[17]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[17]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart19 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 18"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[18]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[18]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart20 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 19"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[19]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[19]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart21 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 20"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[20]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[20]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart22 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 21"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[21]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[21]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart23 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 22"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[22]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[22]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart24 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 23"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[23]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[23]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
Object AutoStart25 $MenuButton
Body SysBody
Attr ButtonName = "AutoStart 24"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "AutoStart[24]"
Attr MethodArguments[1] = "XttGraph"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "AutoStart[24]"
Attr FilterArguments[1] = "XttGraph"
EndBody
EndObject
EndObject
EndObject
EndObject
EndObject
......
......@@ -111,6 +111,16 @@ SObject pwrb:Type
Attr Value = 32
EndBody
EndObject
!/**
! Hide the Navigator.
!*/
Object HideNavigator $Bit
Body SysBody
Attr PgmName = "HideNavigator"
Attr Text = "HideNavigator"
Attr Value = 64
EndBody
EndObject
EndObject
EndSObject
......
......@@ -961,6 +961,8 @@ int OpGtk::configure( char *opplace_str)
if ( opplace_p->StartJavaProcess)
start_jop = 1;
// Store autostart array
memcpy( autostart_aref, opplace_p->AutoStart, sizeof(autostart_aref));
// Examine Graph objects
for ( i = 0; i < sizeof(opplace_p->FastAvail)/sizeof(opplace_p->FastAvail[0]); i++) {
......
......@@ -94,8 +94,8 @@ void Op::scan()
int Op::appl_action( int idx)
{
char cmd[80];
char name[80];
pwr_tCmd cmd;
pwr_tAName name;
int sts;
if ( command_cb) {
......@@ -363,3 +363,31 @@ void Op::sup_scan( void *data)
op->sup_timerid->add( time, sup_scan, op);
}
void Op::appl_startup()
{
pwr_tCmd cmd;
pwr_tAName name;
int sts;
if ( command_cb) {
if ( layout_mask & pwr_mOpWindLayoutMask_HideNavigator) {
strcpy( cmd, "close navigator");
command_cb( parent_ctx, cmd);
}
for ( unsigned int i = 0; i < sizeof(autostart_aref)/sizeof(autostart_aref[0]); i++) {
if ( cdh_ObjidIsNotNull( autostart_aref[i].Objid)) {
sts = gdh_AttrrefToName( &autostart_aref[i], name, sizeof(name),
cdh_mName_volumeStrict);
if ( ODD(sts)) {
strcpy( cmd, "ope gra/obj=");
strcat( cmd, name);
command_cb( parent_ctx, cmd);
}
}
}
}
}
......@@ -98,6 +98,7 @@ class Op {
pwr_tAttrRef button_aref[25];
int button_cnt;
int start_jop;
pwr_tAttrRef autostart_aref[25];
Jop *jop;
void (*command_cb)( void *, char *);
void (*map_cb)( void *);
......@@ -129,6 +130,7 @@ class Op {
int appl_action( int idx);
int jop_command( char *command);
int sup_init();
void appl_startup();
void activate_exit();
void activate_aalarm_ack();
void activate_balarm_ack();
......
......@@ -2867,6 +2867,7 @@ static int xnav_open_func( void *client_data,
xnav->op->add_close_button();
strcpy( xnav->opplace_name, opplace_str);
xnav->op->set_title( xnav->user);
xnav->op->appl_startup();
// Load eventlist
if ( xnav->ev) {
......
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