Commit 4edbdaf7 authored by Claes Sjofors's avatar Claes Sjofors

Xtt command 'set graph /inconify' and 'set graph /below' added

parent 7e0cab03
......@@ -73,6 +73,19 @@ gboolean XttGeGtk::action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer da
return FALSE;
}
void XttGeGtk::iconify( int val)
{
if ( val)
gtk_window_iconify( GTK_WINDOW(toplevel));
else
gtk_window_deiconify( GTK_WINDOW(toplevel));
}
void XttGeGtk::set_below( int val)
{
gtk_window_set_keep_below( GTK_WINDOW(toplevel), val);
}
void XttGeGtk::set_size( int width, int height)
{
int default_width;
......
......@@ -80,6 +80,8 @@ class XttGeGtk : public XttGe {
void confirm_reply( int ok);
void *get_widget() { return toplevel;}
GtkWidget *get_graph_widget() { return graph_form;}
void iconify( int val);
void set_below( int val);
static void ge_change_value_cb( void *ge_ctx, void *value_object, char *text);
static void confirm_cb( void *ge_ctx, void *confirm_object, char *text);
......
......@@ -90,6 +90,8 @@ class XttGe : XttUtility {
virtual void set_size( int width, int height) {}
virtual void confirm_reply( int ok) {}
virtual void *get_widget() { return 0;}
virtual void iconify( int val) {}
virtual void set_below( int val) {}
xtt_eUtility get_type() { return xtt_eUtility_Graph;}
void message( char severity, const char *msg);
......
......@@ -373,7 +373,8 @@ dcli_tCmdTable xnav_command_table[] = {
&xnav_set_func,
{ "dcli_arg1", "dcli_arg2", "/NAME", "/VALUE",
"/BYPASS", "/PUBLICWRITE", "/INDEX", "/SOURCE", "/OBJECT", "/CONTINUE",
"/X0", "/Y0", "/X1", "/Y1", "/INSTANCE", "/ESCAPESTORE", "/FOCUS", "/INPUTEMPTY",
"/X0", "/Y0", "/X1", "/Y1", "/INSTANCE", "/ESCAPESTORE", "/FOCUS", "/INPUTEMPTY",
"/ICONIFY", "/BELOW",
""}
},
{
......@@ -1234,6 +1235,8 @@ static int xnav_set_func( void *client_data,
pwr_tAName instance_str;
char *instance_p = 0;
char name_str[200];
char iconify_str[20];
char below_str[20];
XttGe *gectx;
if ( ODD( dcli_get_qualifier( "/INSTANCE", instance_str, sizeof(instance_str))))
......@@ -1252,6 +1255,32 @@ static int xnav_set_func( void *client_data,
if ( ODD( dcli_get_qualifier( "/ESCAPESTORE", 0, 0))) {
gectx->set_object_focus( 0, 0);
}
else if ( ODD( dcli_get_qualifier( "/ICONIFY", iconify_str, sizeof(iconify_str)))) {
int iconify;
if ( strcmp( iconify_str, "1") == 0)
iconify = 1;
else if ( strcmp( iconify_str, "0") == 0)
iconify = 0;
else {
xnav->message('E', "Syntax error");
return XNAV__SUCCESS;
}
gectx->iconify( iconify);
}
else if ( ODD( dcli_get_qualifier( "/BELOW", below_str, sizeof(below_str)))) {
int below;
if ( strcmp( below_str, "1") == 0)
below = 1;
else if ( strcmp( below_str, "0") == 0)
below = 0;
else {
xnav->message('E', "Syntax error");
return XNAV__SUCCESS;
}
gectx->set_below( below);
}
else {
xnav->message('E', "Syntax error");
return XNAV__SUCCESS;
......
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