Hello Marcin,
I have written a number of gtk3 apps that perform the type of rubberband
line drawing you have described. Although I was originally porting apps
from an Xlib drawing environment where XOR was available to do
lightning-fast 'undraws' of existing line segments and was skeptical of
Hi guys,
There is any way to detect user inactivity in my application?
Thanks
Ruben
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Hi Marcin,
One approach is to use a GtkOverlay. Draw the shape on the top and then save
the coordinates of the shape if it is what you want. Then you can draw the
saved shapes on the lower drawing area.
https://github.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/cairo_drawings/draw_re
The key is to not draw directly, but to invalidate one or more rectangles
needed to for changing the image from the old to the new one.
I worked on this problem some years ago and I think my solution is very
relevant to your question.
See the gtk3 branch at: https://github.com/dov/dovtk-lasso .
Hi everyone,
I'd like to write very simple application for drawing lines.
1) User press button - app saves x and y coordinates
2) User moves the mouse - app dynamically draws potential line on each
mouse move event
3) User releases button - app "saves" the line on the canvas.
I've tried to modi
Hello Mr. Jacobi
What I personally like to see is doing events. It makes your OOP extensible.
And is the usual way how things are done in GUI programming.
But it is not limited to GUI. For instance this event is handled by a
GUI callback
to toggle a button.
http://git.savannah.nongnu.org/cgit/gs
Hi
You don't have to use myWidget->parent since you dereference the pointer.
A pointer to a struct always points to the first field of the topmost
nesting level.
so it would be:
gtk_widget_set_name(myWidget);
Bests,
Joël
On Mon, Mar 20, 2017 at 6:29 PM, S. Jacobi wrote:
> On Mon, 20 Mar 20
On Mon, 20 Mar 2017 18:10:16 +0100
Joël Krähemann wrote:
> Hi
>
> As Tristan told you. The struct contains the other struct as not using
> a pointer.
>
> struct MyCompositeWidget
> {
> GtkAlignment alignment;
>
> GtkBox *box;
> };
>
The parent-is-a-pointer mistake was just me not thinking
On Mon, 20 Mar 2017 16:01:39 +
Tristan Van Berkom wrote:
>
> Use instance private data, this will not need any priv pointer and
> can be done with th G_DEFINE_TYPE_WITH_PRIVATE() macro, and another
> to lookup your private data inside your C file (under the hood, this
> uses negative instanc
Hi
No, you can talk in C of direct inheritance. Or implementing an interface.
As Tristan told you. The struct contains the other struct as not using
a pointer.
struct MyCompositeWidget
{
GtkAlignment alignment;
GtkBox *box;
};
The properties are inherited, too. As long you use
g_type_regis
On Mon, 2017-03-20 at 16:36 +0100, S. Jacobi wrote:
> First of all, inheritance may be the wrong word here in plain c, but
> I
> don't know how else to name it.
Sorry replied to this from my phone and missed some things...
> In different projects I see different approaches how to derive custom
>
Hi
> On Mar 20, 2017, at 3:36 PM, S. Jacobi wrote:
>
> First of all, inheritance may be the wrong word here in plain c, but I
> don't know how else to name it.
>
> In different projects I see different approaches how to derive custom
> widgets from existing ones. I can roughly group them into 2
First of all, inheritance may be the wrong word here in plain c, but I
don't know how else to name it.
In different projects I see different approaches how to derive custom
widgets from existing ones. I can roughly group them into 2 to 3.
1) The header only has a typedef to make the struct opaque
13 matches
Mail list logo