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

Functions to create the 'OpenGL -> Style' submenu. More...

#include "global.h"
#include "bind.h"
#include "project.h"
#include "glview.h"
#include "glwindow.h"
#include "preferences.h"
Include dependency graph for m_style.c:

Go to the source code of this file.

Functions

gchar * label_atpts (project *this_proj, glwin *view, int id)
 prepare the text of a menu item in the 'Model -> Atom(s)' submenu
void clean_atom_style (project *this_proj)
 clean all atom(s) possible alternative rendering styles
int get_filled_id (int sid)
 retrieve filled ID number in FILLED_STYLES based on style ID
int get_style_id (int sid)
 retrieve style ID number in OGL_STYLES based on style ID
G_MODULE_EXPORT void set_style (GtkWidget *widg, gpointer data)
 set style callback
void set_this_style (glwin *view, int style)
 set general style for atom(s) and bond(s)
G_MODULE_EXPORT void change_style_radio (GSimpleAction *action, GVariant *parameter, gpointer data)
 change style callback GTK4
GMenu * menu_style (glwin *view, int popm)
 create the 'OpenGL -> Style' submenu - GTK4

Variables

char * text_styles [OGL_STYLES]
char * text_filled [FILLED_STYLES]

Detailed Description

Functions to create the 'OpenGL -> Style' submenu.

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_style.c.

Function Documentation

◆ change_style_radio()

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

change style callback GTK4

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

Definition at line 437 of file m_style.c.

◆ clean_atom_style()

void clean_atom_style ( project * this_proj)

clean all atom(s) possible alternative rendering styles

Parameters
this_projthe target project

Definition at line 78 of file m_style.c.

◆ get_filled_id()

int get_filled_id ( int sid)

retrieve filled ID number in FILLED_STYLES based on style ID

Parameters
sidthe style id

Definition at line 184 of file m_style.c.

◆ get_style_id()

int get_style_id ( int sid)

retrieve style ID number in OGL_STYLES based on style ID

Parameters
sidthe style id

Definition at line 196 of file m_style.c.

◆ label_atpts()

gchar * label_atpts ( project * this_proj,
glwin * view,
int id )
extern

prepare the text of a menu item in the 'Model -> Atom(s)' submenu

Parameters
this_projthe target project
viewthe target glwin
idthe type of label to prepare

Definition at line 73 of file m_atoms.c.

◆ menu_style()

GMenu * menu_style ( glwin * view,
int popm )

create the 'OpenGL -> Style' submenu - GTK4

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

Definition at line 479 of file m_style.c.

◆ set_style()

G_MODULE_EXPORT void set_style ( GtkWidget * widg,
gpointer data )

set style callback

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 209 of file m_style.c.

◆ set_this_style()

void set_this_style ( glwin * view,
int style )

set general style for atom(s) and bond(s)

Parameters
viewthe target glwin
stylethe general style to apply

Definition at line 293 of file m_style.c.

Variable Documentation

◆ text_filled

char* text_filled[FILLED_STYLES]
Initial value:
= {i18n("Covalent Radii"),
i18n("Ionic Radii"),
i18n("van der Waals Radii"),
i18n("In Crystal Radii")}
#define i18n(String)
Definition global.c:80

Definition at line 66 of file m_style.c.

◆ text_styles

char* text_styles[OGL_STYLES]
Initial value:
= {i18n("Balls and Sticks"),
i18n("Wireframes"),
i18n("Spacefilled"),
i18n("Spheres"),
i18n("Cylinders"),
i18n("Dots")}

Definition at line 59 of file m_style.c.