gtk3

How to configure VSCode for GTK3 for intellisense / build / debug and g++

橙三吉。 提交于 2021-01-21 09:19:06
问题 I'm using g++ GTK3 VSCode How do I get the following to work: Intellisense / code completion for gtk Buiding inside VSCode Debugging with VSCode Problem: VSCode does not find includes - especially #include <gtk/gtk.h> is red in source. 回答1: The important thing to note is, that you need to tell VSCode the include paths and compiler flags to work properly. First step: Open the target folder in VSCode. Now you should have a new hidden folder .vscode in there. Open it. You want to apply the

How to get the attachment values when a widget has been attached to a grid

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-05 20:40:33
问题 This will show all attributes and their values of an existing widget: (I got the idea from user285594 at this post) obj = [widget identifier] for pspec in obj.props: print(pspec.name) name = pspec.name.replace('-', '_') props = eval("button.props." + name) print(props) Unfortunately, I can't find the attachment values when the widget has been attached to a grid. Does anyone know how to do this? 回答1: The attachment and packing values are child properties, not properties, so you have to

How to get the attachment values when a widget has been attached to a grid

假如想象 提交于 2021-01-05 20:39:00
问题 This will show all attributes and their values of an existing widget: (I got the idea from user285594 at this post) obj = [widget identifier] for pspec in obj.props: print(pspec.name) name = pspec.name.replace('-', '_') props = eval("button.props." + name) print(props) Unfortunately, I can't find the attachment values when the widget has been attached to a grid. Does anyone know how to do this? 回答1: The attachment and packing values are child properties, not properties, so you have to

How to get the attachment values when a widget has been attached to a grid

瘦欲@ 提交于 2021-01-05 20:38:17
问题 This will show all attributes and their values of an existing widget: (I got the idea from user285594 at this post) obj = [widget identifier] for pspec in obj.props: print(pspec.name) name = pspec.name.replace('-', '_') props = eval("button.props." + name) print(props) Unfortunately, I can't find the attachment values when the widget has been attached to a grid. Does anyone know how to do this? 回答1: The attachment and packing values are child properties, not properties, so you have to

make file for Gtk

℡╲_俬逩灬. 提交于 2021-01-01 06:30:58
问题 I have a make file, which creates obj files for all source files and then the executable using those obj files (basically compiling each individual file and then linking all of them together). CC = gcc SRC_DIR = src INC_DIR = inc OBJ_DIR = obj CFLAGS = -c -Wall -I$(INC_DIR) EXE = project SRCS = $(SRC_DIR)/main.c $(SRC_DIR)/file1.c # and so on... OBJS = $(OBJ_DIR)/main.o $(OBJ_DIR)/file1.o # and so on... main : clean build build: $(OBJS) $(CC) $(OBJS) -o $(EXE) $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $

How to build GTK+ application with Visual Studio 2019?

ε祈祈猫儿з 提交于 2020-12-30 03:04:00
问题 I installed GTK+ 3.0 as described on https://www.gtk.org/download/windows.php I cloned the git and typed vcpkg install gtk:x64-windows Everything build well. I then opened Visual Studio 2019 and tried to create a console application using C++. I changed the project so it compiles in C instead of C++. However, when I type #include <gtk/gtk.h> it doesn't show on auto complete. I'm not sure where to go from here. Can someone give me any pointers? I want to build a statically linked gtk-3.0

How to build GTK+ application with Visual Studio 2019?

余生颓废 提交于 2020-12-30 02:59:05
问题 I installed GTK+ 3.0 as described on https://www.gtk.org/download/windows.php I cloned the git and typed vcpkg install gtk:x64-windows Everything build well. I then opened Visual Studio 2019 and tried to create a console application using C++. I changed the project so it compiles in C instead of C++. However, when I type #include <gtk/gtk.h> it doesn't show on auto complete. I'm not sure where to go from here. Can someone give me any pointers? I want to build a statically linked gtk-3.0

Linking glade file with program g++

空扰寡人 提交于 2020-12-27 06:07:44
问题 Glade files and the program files can get a bit messy, this becomes a problem when you want your program to be portable. Is there any way to bind your program with your glade files? Source code (unfinished but working project): https://github.com/caelwithcats/valuator 回答1: You can use Gio Resources to include the contents of your .glade files in the application, and then use GtkBuilder's add_from_resource() to load them: https://developer.gnome.org/gtkmm-tutorial/stable/sec-gio-resource.html

Linking glade file with program g++

喜夏-厌秋 提交于 2020-12-27 06:07:39
问题 Glade files and the program files can get a bit messy, this becomes a problem when you want your program to be portable. Is there any way to bind your program with your glade files? Source code (unfinished but working project): https://github.com/caelwithcats/valuator 回答1: You can use Gio Resources to include the contents of your .glade files in the application, and then use GtkBuilder's add_from_resource() to load them: https://developer.gnome.org/gtkmm-tutorial/stable/sec-gio-resource.html

Linking glade file with program g++

杀马特。学长 韩版系。学妹 提交于 2020-12-27 06:07:38
问题 Glade files and the program files can get a bit messy, this becomes a problem when you want your program to be portable. Is there any way to bind your program with your glade files? Source code (unfinished but working project): https://github.com/caelwithcats/valuator 回答1: You can use Gio Resources to include the contents of your .glade files in the application, and then use GtkBuilder's add_from_resource() to load them: https://developer.gnome.org/gtkmm-tutorial/stable/sec-gio-resource.html