Skip to content
Snippets Groups Projects
Commit 9a7e22e2 authored by Robert Klöfkorn's avatar Robert Klöfkorn
Browse files

Added colorbar min-max button.

[[Imported from SVN: r4360]]
parent 92fc0785
No related branches found
No related tags found
No related merge requests found
......@@ -1174,9 +1174,17 @@ inline SCENE* scene_maxlevel_on_off ()
END_METHOD (sc);
}
inline SCENE* scene_set_min_max_values ()
{
SCENE* sc = (SCENE*) START_METHOD (G_INSTANCE);
ALERT( sc, "set-min-max-values: No hmesh!", END_METHOD(NULL));
double min = -1e37, max = 1e37;
GRAPE(sc, "value-min-max") (min, max);
colorBarMinMax(min,max);
//HMESH3D * new_hmesh3d_clip(double (*f)(),
// void *var, void (*draw_clip)() , void *scal);
END_METHOD (sc);
}
GENMESH3D * genmesh3d_switch_iterateLeafs_on_off();
......@@ -1210,6 +1218,8 @@ inline static void grape_add_remove_methods(void)
if( ! (GRAPE(Scene,"find-method") ("maxlevel-on-off")) )
GRAPE(Scene,"add-method") ("maxlevel-on-off",scene_maxlevel_on_off);
if( ! (GRAPE(Scene,"find-method") ("set-min-max-values")) )
GRAPE(Scene,"add-method") ("set-min-max-values",scene_set_min_max_values);
{
char p_name[32];
sprintf(p_name,"uif-m%d",GRAPE_DIM);
......
......@@ -115,34 +115,23 @@ inline void setupLeafButton(MANAGER *mgr, void *sc, int yesTimeScene)
I_FillMode, MENU_FILL_BOTTOM,
I_End);
minMaxColorbar = (BUTTON *)
new_item (Button,
I_Label, "set min/max to Colorbar",
I_Instance, sc,
I_Method, "set-min-max-values",
I_Size, 12., 1.,
I_FillMode, MENU_FILL_BOTTOM,
I_End);
GRAPE(mgr,"add-inter") (maxlevelButton);
GRAPE(mgr,"add-inter") (minMaxColorbar);
GRAPE(maxlevelButton,"set-state") (PRESSED);
GRAPE(minMaxColorbar,"set-state") (UNPRESSED);
maxlevelButton->on_off = OFF;
}
#if 0
COLORBAR *colorbar_eval_samples_layer(XLIST *xlist)
{
COLORBAR *self;
ASSURE( self=(COLORBAR *)START_METHOD(G_INSTANCE),"", END_METHOD(NULL));
if( xlist->chosen ) {
if( samples[xlist->chosen_key].func )
samples[xlist->chosen_key].func(self);
}
/* update the display */
GRAPE(GRAPE(Manager,"get-stdmgr") (),"set-graphic-redraw") (rfOn);
g_hide_layer((ITEM *)xlist);
END_METHOD(self);
}
#endif
inline void timeSceneInit(INFO *info, int n_info, int procs, int time_bar)
{
int n,p;
......
......@@ -6,6 +6,9 @@
/* global variables for maxlevel use */
static BUTTON * maxlevelButton=0;
/* on click set min and max value of function to colorbar */
static BUTTON * minMaxColorbar=0;
/* global variables for iterator choice */
static COMBOBUTTON * iteratorButton = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment