gtk

How to use an SVG file as input for drawing with Cairo in a pyGTK application (python)?

I am writing a small python GTK application in which I have a drawing area that I am trying to "populate" using Cairo, which is a library I never used before (so bare with me if the answer is obvious and I did not see due to inexperience). What I am trying to achieve is using an SVG image as part of my drawing (if I got Cairo naming rig...

How can I insert text into another application?

To scratch a personal itch, I'm writing something like a cross between a character map and an on-screen keyboard. When the user selects a character, I'd like to insert it into another application, specifically, the application that would next receive focus if my application were closed. Is there any way to do this? Right now, I work arou...

How to correct drive names in Gtk.FileChooserDIalog under Windows?

Hello! I write the simple example with gtk.FileChooserDialog. It works fine, but there is one problem under WIndows: I see '\' in first button instead of real drive names, such as 'C:\', 'D:\' and so on. I explored FileChooserDialog structure and tried to change '\' by real drive name, but it works unstable. Can anybody help me? import ...

gtk styles not behaving properly

I was attempting to mess with the style of a Button, and noticed that my changes were making the button look strange. To make sure I was doing the right thing, I tried doing what I thought would be semantically a no-op: button.set_style(button.get_style()) However, the button style changes dramatically after this line. I'm on Windows ...

gtk: indicate a button should be pressed

What's the best way to indicate on a GTK interface that a button should be pressed / to "highlight" the button? The use case is that I have a set of checkboxes representing various settings, but for them to take effect, they must be submitted to a server. I want to indicate that the currently checked settings have not been sent to the se...

Retrieving the color of a given pixel in Gtk+/Gtkmm

Which is the best and fastest way to retrieve the color of a given pixel of a widget? For example: I load an image onto a Gtk::DrawingArea or draw something on it. Then I try to retrieve the color of the pixel that the mouse cursor is over. I use this technique: bool MainWindow::on_canvas_motion_notify(GdkEventMotion* event) { get_...

GtkExpander style widget in wxWidgets?

I'm looking for a widget along the lines of GtkExpander, but for wxWidgets. Can't seem to find anything obvious in the documentation. Custom widgets (non-GPL) from somewhere else would be fine, but they need to work on Windows (i.e. without GTK). Practically (if it makes any difference) this is primarily for wxPython, on Windows and hop...

gtk get new selection in a treeview during the signal

I want to detect whenever the selection of my gtk.TreeView changes and, when it does, to call a function w/ this information. The only way I've found to do it so far is to attach to all these signals: ... self.sitterView.connect("cursor-changed", self.selectionChanged) self.sitterView.connect("unselect-all", self.selectionChange...

is it is possible to run an background process if the window is closed?

hello, i am creating an application in c++ gtk and if i press an button an threading process will start and i need to run the application if the window is closed also is it is possible? ...

use the system monospace font in gtk textview

I would like to have a GtkTextView in my (Python) program which shows text with the system monospace font. I found many ways which use an expicit font family name and size. However, I would like to use the system specified monospace font (e.g. from the ubuntu font preferences panel). My program should be able to run on Windows as well a...

What language to use for text editor?

This is sort of a strange question, but oh well. I feel like writing a (rich) text editor mainly to be used for note-taking, in either C or C++, using most probably GTK or Qt for the UI. The problem is that I can't really decide what to use. I know both C and C++, C a little better. I've never used Qt but I'm completely fine with learn...

gtkbutton font color change

Hi Experts, I am trying to change the color of text displayed on GtkButton using gtk_widget_modify_fg() but it is not working. I have successfully changed the background of GtkButton using gtk_widget_modify_bg() but foreground one is not working. Please help. Regards -Durgesh O Mishra ...

Get original row number from .get_model() and .get_path() after TreeView was resorted

So I have this TreeView/TreeStore, which I fill with data from a list. My application uses only said list as reference data. The TreeStore is just constructed for display. And the TreeView can be resorted by tipping the column headers. Because .set_sort_column_id() was used for initialization of each column. Problem is, following code a...

State-of-the-art for embedding scriptable, interactive SVG in Gtk+ applications?

I'm interested in writing a Gtk application that uses an embedded SVG canvas for graphics, and I'm wondering what the current state-of-the-art is for using SVG in Gtk. I know that it's possible to embed Webkit inside of Gtk, and so that seems like one approach, but I would like to add interactivity to DOM elements in the embedded SVG can...

add a child to GtkVBox

Hi, I have problem while adding a child to a GtkVBox. The VBox is inside a GtkViewPort which is inside a ScrolledWindows. After the child it's added using gtk_box_pack_end I check if it's really added checking the GLIST and it appears that it's added. Although visually anything appears and the scrolled window gets really big. Like if...

Can I load a gtkbuilder app into a "parent" gtkbuilder frame?

I am using Glade-3 to build a suite of Gtk applications. The applications are supposed to have a common look-and-feel, and we have decided on a common "frame" that all apps will share, that includes a menu bar, toolbar, status-bar(s), a vertical panel - and a space in the middle that will be filled out by each application. This common ...

parsing an online document (xml file) in gtk

how do i parse an online document (xml file) in gtk, for example the url : http://www.w3schools.com/XML/note.xml contains the xml file. ...

Inner-workings of Keyboard Event Handling under Linux

When I press a keyboard's key on some GTK application under Linux, what happens exactly? How does a key get received (from which device), interpreted, passed to the program, and then handled? ...

c code for gtk+ vs glade generated .glade files

I am new in the field of gtk+ programming. I'm still exploring many options to use. I will be coding in C language. I have the following questions: Which is better? Writing code or using the .glade files generated by glade? Which is better to use? libglade or gtkbuilder? Why is using the build option in glade2 discouraged? ...

PHP GTK module in php.ini

I installed PHP GTK in C:\php-gtk but when I go to run it like from the command line like this cd C:\php-gtk2 php demos\phpgtk2-demo.php It gives this error Please load the php-gtk2 module in your php.ini My ini file has this content (it is called php-cli.ini) [PHP] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; About the php.ini in PHP-GTK ...