Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
3a34d908
Commit
3a34d908
authored
Jan 18, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Togglebutton for feeback connection in plc editor
parent
207b4f59
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
2 deletions
+31
-2
wb/lib/wb/gtk/wb_foe_gtk.cpp
wb/lib/wb/gtk/wb_foe_gtk.cpp
+17
-0
wb/lib/wb/gtk/wb_foe_gtk.h
wb/lib/wb/gtk/wb_foe_gtk.h
+1
-0
wb/lib/wb/src/wb_foe.cpp
wb/lib/wb/src/wb_foe.cpp
+11
-2
wb/lib/wb/src/wb_foe.h
wb/lib/wb/src/wb_foe.h
+2
-0
wb/mmi/wb/src/foe_confeedback.png
wb/mmi/wb/src/foe_confeedback.png
+0
-0
No files found.
wb/lib/wb/gtk/wb_foe_gtk.cpp
View file @
3a34d908
...
...
@@ -515,6 +515,14 @@ void WFoeGtk::activate_palette_object( GtkWidget *w, gpointer data)
foe
->
node_palctx
->
set_inputfocus
(
set
);
}
void
WFoeGtk
::
activate_confeedback
(
GtkWidget
*
w
,
gpointer
data
)
{
WFoeGtk
*
foe
=
(
WFoeGtk
*
)
data
;
int
set
=
(
int
)
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
w
));
((
WFoe
*
)
foe
)
->
activate_confeedback
(
set
);
}
//
// Callback from the menu.
// Display or hide the connection palette.
...
...
@@ -1825,6 +1833,15 @@ pwr_tStatus WFoeGtk::create_window( int x_top,
g_object_set
(
tools_plantpalette
,
"can-focus"
,
FALSE
,
NULL
);
gtk_toolbar_append_widget
(
tools
,
tools_plantpalette
,
"Show Plant Hierarchy"
,
""
);
// Feedback connection checkbutton
GtkWidget
*
tools_confeedback
=
gtk_toggle_button_new
();
dcli_translate_filename
(
fname
,
"$pwr_exe/foe_confeedback.png"
);
gtk_container_add
(
GTK_CONTAINER
(
tools_confeedback
),
gtk_image_new_from_file
(
fname
));
g_signal_connect
(
tools_confeedback
,
"clicked"
,
G_CALLBACK
(
activate_confeedback
),
this
);
g_object_set
(
tools_confeedback
,
"can-focus"
,
FALSE
,
NULL
);
gtk_toolbar_append_widget
(
tools
,
tools_confeedback
,
"Feedback connection"
,
""
);
// Statusbar and cmd input
GtkWidget
*
statusbar
=
gtk_hbox_new
(
FALSE
,
0
);
widgets
.
label
=
gtk_label_new
(
""
);
...
...
wb/lib/wb/gtk/wb_foe_gtk.h
View file @
3a34d908
...
...
@@ -239,6 +239,7 @@ class WFoeGtk : public WFoe {
static
void
activate_palette_con
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_palette_object
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_palette_plant
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_confeedback
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_refcon
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_showexeord
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_plcattribute
(
GtkWidget
*
w
,
gpointer
data
);
...
...
wb/lib/wb/src/wb_foe.cpp
View file @
3a34d908
...
...
@@ -1600,6 +1600,15 @@ void WFoe::gre_con_created( WGre *gre, double x, double y,
foe
->
error_msg
(
*
sts
);
if
(
EVEN
(
*
sts
))
return
;
if
(
foe
->
use_feedback_con
)
{
// Change to corresponding feedback connection
if
(
con_class
==
pwr_cClass_ConDigital
)
con_class
=
pwr_cClass_ConFeedbackDigital
;
else
if
(
con_class
==
pwr_cClass_ConAnalog
)
con_class
=
pwr_cClass_ConFeedbackAnalog
;
}
if
(
user_class
)
con_class
=
user_class
;
...
...
@@ -2573,7 +2582,7 @@ WFoe::WFoe( void *f_parent_ctx,
node_palette_managed
(
0
),
nav_palette_managed
(
0
),
con_drawtype
(
GOEN_CONDRAW
),
show_execorder
(
0
),
searchindex
(
0
),
popupmenu_mask
(
~
0
),
popupmenu_node
(
0
),
access
(
f_access
),
map_window
(
f_map_window
),
advanced_user
(
1
),
ldh_cb_enabled
(
0
),
classeditor
(
0
),
options
(
f_options
)
classeditor
(
0
),
options
(
f_options
)
,
use_feedback_con
(
0
)
{
strcpy
(
name
,
f_name
);
}
...
...
@@ -2598,7 +2607,7 @@ WFoe::WFoe( void *f_parent_ctx,
node_palette_managed
(
0
),
nav_palette_managed
(
0
),
con_drawtype
(
GOEN_CONDRAW
),
show_execorder
(
0
),
searchindex
(
0
),
popupmenu_mask
(
~
0
),
popupmenu_node
(
0
),
access
(
f_access
),
map_window
(
f_map_window
),
advanced_user
(
1
),
ldh_cb_enabled
(
0
),
classeditor
(
0
),
options
(
f_options
)
classeditor
(
0
),
options
(
f_options
)
,
use_feedback_con
(
0
)
{
strcpy
(
name
,
f_name
);
}
...
...
wb/lib/wb/src/wb_foe.h
View file @
3a34d908
...
...
@@ -119,6 +119,7 @@ class WFoe : public WUtility {
int
ldh_cb_enabled
;
int
classeditor
;
unsigned
int
options
;
int
use_feedback_con
;
static
foe_sAttr
*
attr_pointer
;
static
int
attr_count
;
CoWow
*
wow
;
...
...
@@ -245,6 +246,7 @@ class WFoe : public WUtility {
void
activate_view_togg
(
int
set
);
void
activate_edit_togg
(
int
set
);
void
activate_conpoint_lock
();
void
activate_confeedback
(
int
set
)
{
use_feedback_con
=
set
;}
void
function_setup
();
int
register_callbacks
();
...
...
wb/mmi/wb/src/foe_confeedback.png
0 → 100644
View file @
3a34d908
238 Bytes
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment