atomes 1.1.14
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
m_map.c File Reference

Functions to create the 'OpenGL -> Color Scheme(s)' submenus
Functions to handle custom color maps. More...

#include "global.h"
#include "interface.h"
#include "project.h"
#include "glwindow.h"
#include "glview.h"
+ Include dependency graph for m_map.c:

Go to the source code of this file.

Functions

GtkWidget * create_css_color_bar (colormap *map)
 create the custom color map visualization widget
 
void init_map_range (colormap *map, int pts)
 initialize custom color map
 
colormapallocate_color_map (int pts, project *this_proj)
 allocate custom color map data
 
gboolean setup_custom_color_map (float *data, project *this_proj, gboolean init)
 prepare the custom color map data
 
G_MODULE_EXPORT void set_point_position (GtkSpinButton *res, gpointer data)
 update color map point position
 
G_MODULE_EXPORT void set_point_color (GtkColorChooser *colob, gpointer data)
 select color map point color
 
GtkWidget * create_map_buttons ()
 create custom color map position and color buttons
 
void update_color_map ()
 update color map visualization widget
 
G_MODULE_EXPORT void add_map_points (GtkSpinButton *res, gpointer data)
 add point to the custom color map
 
G_MODULE_EXPORT void update_cmin_max (GtkEntry *res, gpointer data)
 update color map min / max
 
G_MODULE_EXPORT void run_custom_mize_map (GtkDialog *win, gint response_id, gpointer data)
 customize the color map - running the dialog
 
G_MODULE_EXPORT void custom_mize_map (GtkWidget *but, gpointer data)
 customize the color map - creating the dialog
 
void fill_map_model (GtkTreeStore *store, project *this_proj)
 fill color map tree strore
 
G_MODULE_EXPORT void edit_map_cell (GtkCellRendererText *cell, gchar *path_string, gchar *new_text, gpointer data)
 render color map tree store cell
 
GtkWidget * create_map_tree (project *this_proj)
 create color map tree view
 
G_MODULE_EXPORT void run_edit_data_map (GtkDialog *win, gint response_id, gpointer data)
 edit color map - running the dialog
 
G_MODULE_EXPORT void edit_data_map (GtkWidget *but, gpointer data)
 edit color map - creating the dialog
 
gboolean open_save_map (FILE *fp, int act, project *this_proj)
 open or save a custom color map to file
 
G_MODULE_EXPORT void run_open_save_data_map (GtkDialog *info, gint response_id, gpointer data)
 open / save color map data - running the dialog GTK3
 
G_MODULE_EXPORT void open_save_data_map (GtkWidget *but, gpointer data)
 open / save color map data - creating the dialog
 
G_MODULE_EXPORT void run_use_color_map (GtkDialog *win, gint response_id, gpointer data)
 use custom color map - running the dialog
 
gboolean use_custom_color_map (int p)
 use custom color map - creating the dialog
 
G_MODULE_EXPORT void set_color_map (GtkWidget *widg, gpointer data)
 set color map callback
 
G_MODULE_EXPORT void change_color_radio (GSimpleAction *action, GVariant *parameter, gpointer data)
 change color map callback - GTK4
 
GMenu * menump (glwin *view, int popm, int mid, int cid)
 create the 'Color Scheme(s) - > *' submenus - GTK4
 
GMenu * menu_map (glwin *view, int popm)
 create the 'OpenGL -> Color Scheme(s)' submenu - GTK4
 

Variables

const gchar * dfi [2]
 
gboolean cmap_changed = FALSE
 
GtkWidget * map_but [3]
 
GtkTreeStore * map_model
 
colormapthe_map
 
colormaptmp_map
 
GtkWidget * vcbox
 
GtkWidget * vbbox
 
GtkWidget * color_fix
 
GtkWidget * color_bar
 
float * tmp_data
 
dint osmap
 
gboolean res_use_map
 

Detailed Description

Functions to create the 'OpenGL -> Color Scheme(s)' submenus
Functions to handle custom color maps.

Author
Sébastien Le Roux sebas.nosp@m.tien.nosp@m..lero.nosp@m.ux@i.nosp@m.pcms..nosp@m.unis.nosp@m.tra.f.nosp@m.r

Definition in file m_map.c.

Function Documentation

◆ add_map_points()

G_MODULE_EXPORT void add_map_points ( GtkSpinButton * res,
gpointer data )

add point to the custom color map

Parameters
resthe GtkSpinButton sending the signal
datathe associated data pointer

Definition at line 411 of file m_map.c.

◆ allocate_color_map()

colormap * allocate_color_map ( int pts,
project * this_proj )

allocate custom color map data

Parameters
ptsthe number of data point(s) to create
this_projthe target project

Definition at line 188 of file m_map.c.

◆ change_color_radio()

G_MODULE_EXPORT void change_color_radio ( GSimpleAction * action,
GVariant * parameter,
gpointer data )

change color map callback - GTK4

Parameters
actionthe GAction sending the signal
parameterGVariant parameter of the GAction
datathe associated data pointer

Definition at line 1179 of file m_map.c.

◆ create_css_color_bar()

GtkWidget * create_css_color_bar ( colormap * map)

create the custom color map visualization widget

Parameters
mapthe custom color map to visualize

Definition at line 99 of file m_map.c.

◆ create_map_buttons()

GtkWidget * create_map_buttons ( )

create custom color map position and color buttons

Definition at line 367 of file m_map.c.

◆ create_map_tree()

GtkWidget * create_map_tree ( project * this_proj)

create color map tree view

Parameters
this_projthe target project

Definition at line 674 of file m_map.c.

◆ custom_mize_map()

G_MODULE_EXPORT void custom_mize_map ( GtkWidget * but,
gpointer data )

customize the color map - creating the dialog

Parameters
butthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 502 of file m_map.c.

◆ edit_data_map()

G_MODULE_EXPORT void edit_data_map ( GtkWidget * but,
gpointer data )

edit color map - creating the dialog

Parameters
butthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 735 of file m_map.c.

◆ edit_map_cell()

G_MODULE_EXPORT void edit_map_cell ( GtkCellRendererText * cell,
gchar * path_string,
gchar * new_text,
gpointer data )

render color map tree store cell

Parameters
cellthe GtkCellRendererText to render
path_stringthe path in the tree store
new_text
datathe associated data pointer

Definition at line 638 of file m_map.c.

◆ fill_map_model()

void fill_map_model ( GtkTreeStore * store,
project * this_proj )

fill color map tree strore

Parameters
storethe GtkTreeStore to fill
this_projthe target project

Definition at line 596 of file m_map.c.

◆ init_map_range()

void init_map_range ( colormap * map,
int pts )

initialize custom color map

Parameters
mapthe custom color map
ptsnumber of point(s) in the custom color map

Definition at line 154 of file m_map.c.

◆ menu_map()

GMenu * menu_map ( glwin * view,
int popm )

create the 'OpenGL -> Color Scheme(s)' submenu - GTK4

Parameters
viewthe target glwin
popmmain app (0) or popup (1)

Definition at line 1272 of file m_map.c.

◆ menump()

GMenu * menump ( glwin * view,
int popm,
int mid,
int cid )

create the 'Color Scheme(s) - > *' submenus - GTK4

Parameters
viewthe target glwin
popmmain app (0) or popup (1)
midthe object (0 = atoms, 1 = polyhedra)
cidthe active color map for object

Definition at line 1234 of file m_map.c.

◆ open_save_data_map()

G_MODULE_EXPORT void open_save_data_map ( GtkWidget * but,
gpointer data )

open / save color map data - creating the dialog

Parameters
butthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 882 of file m_map.c.

◆ open_save_map()

gboolean open_save_map ( FILE * fp,
int act,
project * this_proj )

open or save a custom color map to file

Parameters
fpthe file pointer
actaction (0 = read, 1 = write)
this_projthe target project

Definition at line 769 of file m_map.c.

◆ run_custom_mize_map()

G_MODULE_EXPORT void run_custom_mize_map ( GtkDialog * win,
gint response_id,
gpointer data )

customize the color map - running the dialog

Parameters
winthe GtkDialog sending the signal
response_idthe response id
datathe associated data pointer

Definition at line 474 of file m_map.c.

◆ run_edit_data_map()

G_MODULE_EXPORT void run_edit_data_map ( GtkDialog * win,
gint response_id,
gpointer data )

edit color map - running the dialog

Parameters
winthe GtkDialog sending the signal
response_idthe response id
datathe associated data pointer

Definition at line 713 of file m_map.c.

◆ run_open_save_data_map()

G_MODULE_EXPORT void run_open_save_data_map ( GtkDialog * info,
gint response_id,
gpointer data )

open / save color map data - running the dialog GTK3

Parameters
infothe GtkDialog sending the signal
response_idthe response id
datathe associated data pointer

Definition at line 838 of file m_map.c.

◆ run_use_color_map()

G_MODULE_EXPORT void run_use_color_map ( GtkDialog * win,
gint response_id,
gpointer data )

use custom color map - running the dialog

Parameters
winthe GtkDialog sending the signal
response_idthe response id
datathe associated data pointer

Definition at line 959 of file m_map.c.

◆ set_color_map()

G_MODULE_EXPORT void set_color_map ( GtkWidget * widg,
gpointer data )

set color map callback

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 1011 of file m_map.c.

◆ set_point_color()

G_MODULE_EXPORT void set_point_color ( GtkColorChooser * colob,
gpointer data )

select color map point color

Parameters
colobthe GtkColorChooser sending the signal
datathe associated data pointer

Definition at line 352 of file m_map.c.

◆ set_point_position()

G_MODULE_EXPORT void set_point_position ( GtkSpinButton * res,
gpointer data )

update color map point position

Parameters
resthe GtkSpinButton sending the signal
datathe associated data pointer

Definition at line 314 of file m_map.c.

◆ setup_custom_color_map()

gboolean setup_custom_color_map ( float * data,
project * this_proj,
gboolean init )

prepare the custom color map data

Parameters
datadata value(s) if any
this_projthe target project
initinitialize color map (0= no, 1= yes)

Definition at line 211 of file m_map.c.

◆ update_cmin_max()

G_MODULE_EXPORT void update_cmin_max ( GtkEntry * res,
gpointer data )

update color map min / max

Parameters
resthe GtkEntry sending the signal
datathe associated data pointer

Definition at line 431 of file m_map.c.

◆ update_color_map()

void update_color_map ( )

update color map visualization widget

Definition at line 392 of file m_map.c.

◆ use_custom_color_map()

gboolean use_custom_color_map ( int p)

use custom color map - creating the dialog

Parameters
pthe target project id

Definition at line 979 of file m_map.c.

Variable Documentation

◆ cmap_changed

gboolean cmap_changed = FALSE

Definition at line 81 of file m_map.c.

◆ color_bar

GtkWidget* color_bar

Definition at line 89 of file m_map.c.

◆ color_fix

GtkWidget* color_fix

Definition at line 88 of file m_map.c.

◆ dfi

const gchar* dfi[2]
extern

Definition at line 75 of file main-b.c.

◆ map_but

GtkWidget* map_but[3]

Definition at line 82 of file m_map.c.

◆ map_model

GtkTreeStore* map_model

Definition at line 83 of file m_map.c.

◆ osmap

dint osmap

Definition at line 813 of file m_map.c.

◆ res_use_map

gboolean res_use_map

Definition at line 948 of file m_map.c.

◆ the_map

colormap* the_map

Definition at line 84 of file m_map.c.

◆ tmp_data

float* tmp_data

Definition at line 90 of file m_map.c.

◆ tmp_map

colormap* tmp_map

Definition at line 85 of file m_map.c.

◆ vbbox

GtkWidget* vbbox

Definition at line 87 of file m_map.c.

◆ vcbox

GtkWidget* vcbox

Definition at line 86 of file m_map.c.