atomes 1.1.16
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
m_back.c
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2024 by CNRS and University of Strasbourg */
15
22/*
23* This file: 'm_back.c'
24*
25* Contains:
26*
27
28 - The function to create the background color menu item
29
30*
31* List of functions:
32
33 GtkWidget * menu_back (glwin * view);
34
35 GMenu * menu_back (glwin * view, int popm);
36
37*/
38
39#include "global.h"
40#include "color_box.h"
41#include "glwindow.h"
42
43#ifdef GTK3
51GtkWidget * menu_back (glwin * view)
52{
53 GtkWidget * menub = gtk_menu_new ();
54 GtkWidget * bc = create_menu_item (FALSE, "Color");
55 gtk_menu_shell_append ((GtkMenuShell *)menub, bc);
56 gtk_menu_item_set_submenu ((GtkMenuItem *)bc, color_box(view, -2, 0, 0));
57 return menub;
58}
59#else
68GMenu * menu_back (glwin * view, int popm)
69{
70 GMenu * menu = g_menu_new ();
71 append_opengl_item (view, menu, "back-color", "back-color", popm, popm, NULL, IMG_NONE, NULL, TRUE, NULL, NULL, FALSE, FALSE, FALSE, FALSE);
72 append_opengl_item (view, menu, "More colors ...", "back-color", popm, popm, NULL, IMG_NONE, NULL, FALSE, G_CALLBACK(to_run_back_color_window), view, FALSE, FALSE, FALSE, TRUE);
73 return menu;
74}
75#endif
GtkWidget * color_box(glwin *view, int ideo, int spec, int geo)
create the color palette pointers and menus GTK3 version
Definition color_box.c:254
Structure definitions for color management Function declarations for color management.
G_MODULE_EXPORT void to_run_back_color_window(GtkWidget *widg, gpointer data)
to run background color selection window callback GTK3
Definition w_colors.c:164
Global variable declarations Global convenience function declarations Global data structure defin...
@ IMG_NONE
Definition global.h:260
GtkWidget * create_menu_item(gboolean add_mnemo, gchar *action)
Function declarations for the creation of the OpenGL window.
void append_opengl_item(glwin *view, GMenu *menu, const gchar *name, gchar *key, int mpop, int item_id, gchar *accel, int image_format, gpointer icon, gboolean custom, GCallback handler, gpointer data, gboolean check, gboolean status, gboolean radio, gboolean sensitive)
GMenu * menu_back(glwin *view, int popm)
create the background color menu item GTK4
Definition m_back.c:68
Definition glwin.h:875