Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
57054057
Commit
57054057
authored
16 years ago
by
Stefen Guzik
Browse files
Options
Downloads
Patches
Plain Diff
delete the partition window
parent
99de67fb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Fltk/GUI_Extras.cpp
+17
-14
17 additions, 14 deletions
Fltk/GUI_Extras.cpp
with
17 additions
and
14 deletions
Fltk/GUI_Extras.cpp
+
17
−
14
View file @
57054057
...
@@ -1150,6 +1150,7 @@ void partition_select_groups_cb(Fl_Widget *widget, void *data);
...
@@ -1150,6 +1150,7 @@ void partition_select_groups_cb(Fl_Widget *widget, void *data);
// Pointers to required widgets
// Pointers to required widgets
struct
PartitionDialog
struct
PartitionDialog
{
{
Fl_Window
*
window
;
// Group 0
// Group 0
Fl_Choice
*
choicePartitioner
;
Fl_Choice
*
choicePartitioner
;
Fl_Value_Input
*
inputNumPartition
;
Fl_Value_Input
*
inputNumPartition
;
...
@@ -1428,6 +1429,7 @@ void partition_partition_cb(Fl_Widget *widget, void *data)
...
@@ -1428,6 +1429,7 @@ void partition_partition_cb(Fl_Widget *widget, void *data)
// Update the screen
// Update the screen
if
(
!
ier
)
{
if
(
!
ier
)
{
opt_mesh_zone_definition
(
0
,
GMSH_SET
,
1.
);
// Define zone by partition
opt_mesh_color_carousel
(
0
,
GMSH_SET
|
GMSH_GUI
,
3.
);
opt_mesh_color_carousel
(
0
,
GMSH_SET
|
GMSH_GUI
,
3.
);
CTX
.
mesh
.
changed
=
ENT_ALL
;
CTX
.
mesh
.
changed
=
ENT_ALL
;
Draw
();
Draw
();
...
@@ -1436,8 +1438,9 @@ void partition_partition_cb(Fl_Widget *widget, void *data)
...
@@ -1436,8 +1438,9 @@ void partition_partition_cb(Fl_Widget *widget, void *data)
void
partition_cancel_cb
(
Fl_Widget
*
widget
,
void
*
data
)
void
partition_cancel_cb
(
Fl_Widget
*
widget
,
void
*
data
)
{
{
widget
->
window
()
->
hide
();
PartitionDialog
*
dlg
=
static_cast
<
PartitionDialog
*>
(
data
);
Fl
::
delete_widget
(
widget
->
window
());
dlg
->
window
->
hide
();
Fl
::
delete_widget
(
dlg
->
window
);
}
}
// Select groups to display
// Select groups to display
...
@@ -1454,9 +1457,8 @@ void partition_select_groups_cb(Fl_Widget *widget, void *data)
...
@@ -1454,9 +1457,8 @@ void partition_select_groups_cb(Fl_Widget *widget, void *data)
"Advanced @-28->"
:
"Advanced @-22->"
);
"Advanced @-28->"
:
"Advanced @-22->"
);
}
}
const
int
WB
=
7
;
// Window border
const
int
WB
=
7
;
// Window border
Fl_Window
*
const
w
=
widget
->
window
();
// Get the groups
// Get the groups
Fl_Widget
*
const
*
g
=
w
->
array
();
Fl_Widget
*
const
*
g
=
dlg
->
windo
w
->
array
();
int
y
=
g
[
0
]
->
h
();
int
y
=
g
[
0
]
->
h
();
switch
(
dlg
->
choicePartitioner
->
value
())
{
switch
(
dlg
->
choicePartitioner
->
value
())
{
case
0
:
case
0
:
...
@@ -1499,8 +1501,8 @@ void partition_select_groups_cb(Fl_Widget *widget, void *data)
...
@@ -1499,8 +1501,8 @@ void partition_select_groups_cb(Fl_Widget *widget, void *data)
}
}
y
+=
g
[
5
]
->
h
();
y
+=
g
[
5
]
->
h
();
// Resize and redraw the window
// Resize and redraw the window
w
->
size
(
w
->
w
(),
y
);
dlg
->
window
->
size
(
dlg
->
windo
w
->
w
(),
y
);
w
->
redraw
();
dlg
->
windo
w
->
redraw
();
}
}
int
partition_dialog
()
int
partition_dialog
()
...
@@ -1581,9 +1583,10 @@ int partition_dialog()
...
@@ -1581,9 +1583,10 @@ int partition_dialog()
const
int
w
=
3
*
BB
+
IW
+
3
*
WB
;
// Window width
const
int
w
=
3
*
BB
+
IW
+
3
*
WB
;
// Window width
int
y
=
0
;
int
y
=
0
;
Dialog_Window
*
const
window
=
new
Dialog_Window
(
w
,
h
,
CTX
.
non_modal_windows
,
dlg
.
window
=
new
Dialog_Window
(
w
,
h
,
CTX
.
non_modal_windows
,
"Partitioner Options"
);
"Partitioner Options"
);
window
->
box
(
GMSH_WINDOW_BOX
);
dlg
.
window
->
box
(
GMSH_WINDOW_BOX
);
dlg
.
window
->
callback
((
Fl_Callback
*
)
partition_cancel_cb
,
&
dlg
);
// Main options group [0]
// Main options group [0]
{
{
...
@@ -1875,20 +1878,20 @@ int partition_dialog()
...
@@ -1875,20 +1878,20 @@ int partition_dialog()
// Cancel Button [3]
// Cancel Button [3]
{
{
Fl_Button
*
const
o
=
new
Fl_Button
(
w
-
(
WB
+
BB
),
y
,
BB
,
BH
,
"Cancel"
);
Fl_Button
*
const
o
=
new
Fl_Button
(
w
-
(
WB
+
BB
),
y
,
BB
,
BH
,
"Cancel"
);
o
->
callback
((
Fl_Callback
*
)
partition_cancel_cb
);
o
->
callback
((
Fl_Callback
*
)
partition_cancel_cb
,
&
dlg
);
}
}
y
+=
BH
+
WB
;
y
+=
BH
+
WB
;
g
->
end
();
g
->
end
();
g
->
show
();
g
->
show
();
}
}
window
->
end
();
dlg
.
window
->
end
();
window
->
hotspot
(
window
);
dlg
.
window
->
hotspot
(
dlg
.
window
);
dlg
.
read_all_options
();
dlg
.
read_all_options
();
// Set the groups to be initally displayed
// Set the groups to be initally displayed
partition_select_groups_cb
(
window
->
child
(
0
)
,
&
dlg
);
partition_select_groups_cb
(
dlg
.
window
,
&
dlg
);
window
->
show
();
dlg
.
window
->
show
();
}
}
#endif // compiling partition dialog
#endif // compiling partition dialog
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment