some remaining untracked changes...

This commit is contained in:
Jean Sirmai 2023-11-09 07:08:37 +01:00
parent 8645ebdb34
commit 9973fe3e8a
Signed by: jean
GPG Key ID: FB3115C340E057E3
2 changed files with 374 additions and 0 deletions

343
src/ui/gemgraph.ui Normal file
View File

@ -0,0 +1,343 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 0.10.2 -->
<interface>
<!-- interface-name gem-graph.ui -->
<requires lib="gtk" version="4.6"/>
<template class="GemGraphClientWindow" parent="GtkApplicationWindow">
<property name="default-height">900</property>
<property name="default-width">1400</property>
<property name="icon-name">application-x-executable</property>
<property name="title">GemGraph 0.1.0</property>
<style>
<class name="devel"/>
</style>
<child type="titlebar">
<object class="GtkHeaderBar" id="main_titlebar">
<child type="end">
<object class="GtkMenuButton" id="main_button_menu">
<property name="direction">none</property>
<property name="menu-model">main_menu</property>
</object>
</child>
<child type="start">
<object class="GtkMenuButton" id="main_button_mode">
<property name="always-show-arrow">True</property>
<property name="use-underline">True</property>
<property name="tooltip-text" translatable="yes">Change session mode</property>
<property name="icon-name">document-edit-symbolic</property>
<property name="menu-model">mode_menu</property>
</object>
</child>
<child>
<object class="GtkToggleButton" id="main_button_sidebar">
<property name="icon-name">sidebar-show-symbolic</property>
<property name="tooltip-text" translatable="yes">Display/hide sidebar</property>
<property name="action-name">app.togglesidebar</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkOverlay" id="toast_overlay">
<child>
<object class="GtkPaned" id="main_paned">
<property name="position">300</property>
<child>
<object class="GtkStack" id="side_stack">
<child>
<object class="GtkStackPage">
<property name="name">run</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="run_controls">
<property name="margin-top">50</property>
<property name="margin-bottom">50</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkToggleButton" id="run_play_control">
<property name="icon-name"></property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkStackSwitcher">
<property name="visible">True</property>
<property name="stack">runlib_stack</property>
</object>
</child>
<child>
<object class="GtkStack" id="runlib_stack">
<child>
<object class="GtkStackPage">
<property name="name">runlib_objects</property>
<property name="title" translatable="yes">Objects</property>
<property name="visible">True</property>
<property name="child">
<object class="GtkLabel" id="label_runlib_objects">
<property name="justify">center</property>
<property name="label" translatable="yes">&lt;b&gt;runlib_objects&lt;/b&gt;</property>
<property name="use-markup">True</property>
<property name="margin-top">50</property>
<property name="margin-bottom">50</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">runlib_conditions_and_rules</property>
<property name="title" translatable="yes">Rules &amp; Conds</property>
<property name="visible">True</property>
<property name="child">
<object class="GtkLabel" id="label_runlib_conditions_and_rules">
<property name="justify">center</property>
<property name="label" translatable="yes">&lt;b&gt;runlib_conditions_and_rules&lt;/b&gt;</property>
<property name="use-markup">True</property>
<property name="margin-top">50</property>
<property name="margin-bottom">50</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">runlib_states</property>
<property name="title" translatable="yes">Savedstates</property>
<property name="visible">True</property>
<property name="child">
<object class="GtkLabel" id="label_runlib_states">
<property name="justify">center</property>
<property name="label" translatable="yes">&lt;b&gt;runlib_states&lt;/b&gt;</property>
<property name="use-markup">True</property>
<property name="margin-top">50</property>
<property name="margin-bottom">50</property>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">home</property>
<property name="child">
<object class="GtkLabel" id="labelhome">
<property name="justify">center</property>
<property name="label" translatable="yes">&lt;b&gt;Sidebar: home&lt;/b&gt;</property>
<property name="use-markup">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">presentation</property>
<property name="child">
<object class="GtkLabel" id="labelsidepresentation">
<property name="justify">center</property>
<property name="label" translatable="yes">&lt;b&gt;Sidebar: presentation mode&lt;/b&gt;</property>
<property name="use-markup">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">edition</property>
<property name="child">
<object class="GtkLabel" id="labelsideedit">
<property name="justify">center</property>
<property name="label" translatable="yes">&lt;b&gt;Sidebar: edition mode&lt;/b&gt;</property>
<property name="use-markup">True</property>
</object>
</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkStack" id="main_stack">
<child>
<object class="GtkStackPage">
<property name="name">run</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkGlArea" id="run_glarea">
</object>
</child>
<child>
<object class="GtkBox" id="glarea_controls">
</object>
</child>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">home</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkImage">
<property name="vexpand">True</property>
<property name="file">data/hicolor/apps/scalable/gemgraph_désaturé.png</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="margin-bottom">50</property>
<property name="margin-top">00</property>
<property name="justify">center</property>
<property name="valign">center</property>
<property name="label" translatable="yes">&lt;b&gt;Welcome to the Gem-graph client.&lt;/b&gt;</property>
<property name="use-markup">True</property>
</object>
</child>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">presentation</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkGlArea" id="presentation_glarea">
</object>
</child>
<child>
<object class="GtkBox" id="presentation_controls">
</object>
</child>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">edition</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkGlArea" id="edition_glarea">
</object>
</child>
<child>
<object class="GtkBox" id="edition_controls">
</object>
</child>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="overlay">
<object class="GtkRevealer" id="toast_revealer">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">start</property>
<property name="transition-type">GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN</property>
<child>
<object class="GtkBox" id="toast_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="spacing">20</property>
<child>
<object class="GtkLabel" id="toast_text">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">(null)</property>
</object>
</child>
<child>
<object class="GtkToggleButton" id="toast_close_button">
<property name="icon-name">window-close-symbolic</property>
<property name="action-name">app.toastclose</property>
</object>
</child>
<style>
<class name="app-notification"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
<menu id="main_menu">
<section>
<item>
<attribute name="label" translatable="yes">_Open...</attribute>
<attribute name="action">app.openfile</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Close</attribute>
<attribute name="action">app.closefile</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Save</attribute>
<attribute name="action">app.savefile</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Preferences</attribute>
<attribute name="action">app.preferences</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About GemGraph</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>
</menu>
<menu id="mode_menu">
<section>
<attribute name="label" translatable="yes">Switch session mode</attribute>
<item>
<attribute name="icon">document-edit-symbolic</attribute>
<attribute name="label" translatable="yes">_Edition</attribute>
<attribute name="action">app.editmode</attribute>
<attribute name="use-icon">True</attribute>
</item>
<item>
<attribute name="icon">system-run-symbolic</attribute>
<attribute name="label" translatable="yes">_Run</attribute>
<attribute name="action">app.runmode</attribute>
<attribute name="use-icon">True</attribute>
</item>
<item>
<attribute name="icon">video-display-symbolic</attribute>
<attribute name="label" translatable="yes">_Presentation</attribute>
<attribute name="action">app.presentmode</attribute>
<attribute name="use-icon">True</attribute>
</item>
</section>
</menu>
</interface>

31
src/ui/tree.c Normal file
View File

@ -0,0 +1,31 @@
/*
* Gem-graph OpenGL experiments
*
* Desc: User interface functions
*
* Copyright (C) 2023 Jean Sirmai <jean@a-lec.org>
*
* This file is part of Gem-graph.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <unistd.h>
#include <gtk-4.0/gtk/gtk.h>
#include <glib-2.0/glib.h>
#include "../../include/base.h"
#include "../../include/ui.h"