Re: Ideas of new widgets and critics, only for enhance gtk+.

2016-12-13 Thread Ondrej Tuma
Hi,

my critics:

Missing Action Helper class:
https://bugzilla.gnome.org/show_bug.cgi?id=768228

Non inherited classes like Gtk.FileFilter
(https://bugzilla.gnome.org/show_bug.cgi?id=724347) or Gtk.Menu ..

Missing to_css method to generate right css from PangoFontDescription

and the last time, getting colors from CSS like in browsers javascript
(another thread in this discussion).

Ondra

PS: Sometimes I miss some special widget, but that widget have only one
special use in applilcation.


V Sun, 11 Dec 2016 10:18:57 +0100
eddie  napsáno:

> Hi to all gtk+ users,
> 
> At first I get few ideas about some new widgets.
> 
> 
> 
> 1. The 3 states button.
> ---
> 
> The most important, the most easy to implement is the idea of a
> button which can take 3 different states.
> 
> I had this idea because I often have the need of something that I
> have called the triboolean logic.
> 
> Which consist of something like a boolean but instead of 0 or 1 as
> possible values you get 3 values:
> 
> -1, 0 and 1.
> 
> It's of course easy to create this type with **typedef**:
> 
> https://github.com/mrcyberfighter/mk-project/blob/master/mk-project-1.0.0/data/templates/C_Project/headers/tribool.h
> 
> But gtk+ don't have this kind of widget and I never try to D.I.Y a
> widget with gtk+.
> 
> ASCII Image of a 3 state button:
> 
> 
> ```
> 
> +-+-+-+
> |  -  |  0  |  +  |
> +-+-+-+
> 
> ```
> 
> 2. The gizmo widget.
> 
> 
> What do you think of a widget emulating a gizmo ?
> 
> A gizmo looks like a joystick stick and is used to control a camera
> for moving the camera and zooming.
> 
> Of course I think it's difficult to set it up to be as generic as
> possible into gtk but not impossible.
> 
> You can per example make a widget looking like this:
> 
> 
> ```
>
>   /\
>   ||
>   \/
> 
> 
> ```
> 
>/\
>   /  \
>  |   \_|_/   |
>  | --|___|-- |
>  |   / | \   |
>  \  /
>   \/
> 
>   
> ```
> 
> A cross to indicate the directions, Inscribe in a circle with
> reactive regions, with a central button.
> 
> 
> I think the best for emulating a gizmo is to take the cross of a
> joystick,
> 
> with 8 directions, and adding a center region to press in/out...
>   
> 
> Once done you can set the increments for every region for X and Y.
> 
> And the action to bind to bind to the central button press button.
> 
> 
> Maybe you can use the inner drag-n-drop mechanic of gtk as base
> for a better control of this widget with the mouse or touch devices.
> 
> Some critics about the Windows compatibility.
> 
> 
> I have seen on this mail list that the bug of the native file chooser
> manifesting by displaying a windows saying that the CD reader device
> is not ready comes from the BIOS CD reading capability...???
> 
> I had the same problem but it has fast disappear after some use of my
> music player.
> 
> What's the problem for implementing a native folder chooser in fact ?
> 
> ---
> 
> My first critic rely on the Gio GAppInfo which simply doesn't work.
> 
> Okay I can't set my application as default for content type per
> example,
> 
> but why ?
> 
> Is this due of the underlying GvFS which Windows not implement ?
>   
> the developers of gtk won't make otherwise, they won't touch the hive
> in writing ?
> 
> 
> I don't really care about it.
> 
> It's a hallas to make Windows understand that your program
> 
> take more than one file as argument, once incomportementstalled,
> 
> whereas you can launch it with cmd.exe then it works.
> 
> They tell me I have to build something like COM serv(er|ice) for
> passing more than one file as argument to my music player. For making
> it work properly for selecting and open with...
> 
> Instead that Windows emulate the cmd.exe to launch a program
> 
> the graphic server (open with) work's otherwise: winshit !
> 
> Good work to the gtk development team but
> 
> stop to change the behavior of some components by every version
> incrementation please.
> 
> I gonna go crazy if I must rewrite parts of all my program due of
> this every time.
> 
> 
> Thanks, best regards,
> 
> mrcyberfighter.
> 



-- 
Ondřej Tůma 
www: http://ipv6.mcbig.cz   jabber: mc...@jabber.cz   twitter: mcbig_cz
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Ideas of new widgets and critics, only for enhance gtk+.

2016-12-11 Thread Eric Cashon via gtk-app-devel-list

You can create your own widgets to look and work like you want with GTK+. There 
is a good example on the gtkmm tutorial which is worth looking at if you are 
interested in doing this. It also shows a little on how you can use CSS to set 
some properties on your new widget.

https://developer.gnome.org/gtkmm-tutorial/stable/sec-custom-widgets.html.en

Even if C++ isn't your thing the gtkmm tutorial is worth taking a look at. A 
lot more examples there compared to the GTK+ C tutorial and they go over a few 
things before they spring the trivial app on you.

I like C and have been testing out some switches derived from a GTK drawing 
area. Sort of some car things like a rocker "toggle" switch, circuit breaker 
switch and gauges. They are with a few simple test programs to see how they 
work.

https://github.com/cecashon/OrderedSetVelociRaptor/tree/master/Misc

The gtkmm tutorial with the penrose triangle I rewrote in C so that I can get 
an understanding of how the CSS works. It is simpler than the gtkmm tutorial 
since deriving from a drawing area is a little easier than from a widget.

Give making a widget a try. That way you can create what you want and be able 
to use the whole GTK+ framework to build the kind of program you might be 
thinking about.

Eric

 

 


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Ideas of new widgets and critics, only for enhance gtk+.

2016-12-11 Thread Nicolas Brack
> 1. The 3 states button.
> ---
> 
> The most important, the most easy to implement is the idea of a button which 
> can take 3 different states.
> 
> I had this idea because I often have the need of something that I have called 
> the triboolean logic.
> 
> Which consist of something like a boolean but instead of 0 or 1 as possible 
> values you get 3 values:
> 
> -1, 0 and 1.
> 
> It's of course easy to create this type with **typedef**:
> 
> https://github.com/mrcyberfighter/mk-project/blob/master/mk-project-1.0.0/data/templates/C_Project/headers/tribool.h
> 
> But gtk+ don't have this kind of widget and I never try to D.I.Y a widget 
> with gtk+.
> 
> ASCII Image of a 3 state button:
> 
> 
> ```
> 
> +-+-+-+
> |  -  |  0  |  +  |
> +-+-+-+
> 
> ```

You can create you own class and implement something quite similar yourself.  I 
suggest you to look at the "history action" buttons of the recent versions of 
evince.  By using the correct style context GTK_STYLE_CLASS_LINKED 
, the 
go-forward/go-back buttons are fused in one block and they look slick.  Look at 
the source code, it's quite simple to read : 
https://git.gnome.org/browse/evince/tree/shell/ev-history-action.c, 
https://git.gnome.org/browse/evince/tree/shell/ev-history-action.h
Then, it's only a matter of using three toggle buttons instead of two push 
buttons, and correctly handling the states between themselves.


-
https://www.mail.be
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Ideas of new widgets and critics, only for enhance gtk+.

2016-12-11 Thread Tristan Van Berkom
On Sun, 2016-12-11 at 10:18 +0100, eddie wrote:
> Hi to all gtk+ users,
> 
> At first I get few ideas about some new widgets.
> 
> 
> 
> 1. The 3 states button.
> ---
> 
> The most important, the most easy to implement is the idea of a
> button which can take 3 different states.
> 
> I had this idea because I often have the need of something that I
> have called the triboolean logic.
> 
> Which consist of something like a boolean but instead of 0 or 1 as
> possible values you get 3 values:
> 
> -1, 0 and 1.
> 
> It's of course easy to create this type with **typedef**:
> 
> https://github.com/mrcyberfighter/mk-project/blob/master/mk-project-1
> .0.0/data/templates/C_Project/headers/tribool.h
> 
> But gtk+ don't have this kind of widget and I never try to D.I.Y a
> widget with gtk+.
> 
> ASCII Image of a 3 state button:
> 
> 
> ```
> 
> +-+-+-+
> > 
> >  -  |  0  |  +  |
> +-+-+-+
> 
> ```

Hi Eddie,

For your above tristate button, this should be achievable without
adding anything to GTK+.

What you want I think is three GtkRadioButtons, and you want them to
be 'linked' together with the CSS - I think this is already the default
appearance when placing 3 radio buttons together in a GtkButtonBox.

I don't think however that a Joystick gizmo widget qualifies as general
purpose enough to be included in GTK+, this kind of thing should
certainly be application specific, or, shared in some other library
with similar widgets (dials ? for apps like q-base and sound mixers ?)

Cheers,
    -Tristan

> 2. The gizmo widget.
> 
> 
> What do you think of a widget emulating a gizmo ?
> 
> A gizmo looks like a joystick stick and is used to control a camera
> for moving the camera and zooming.
> 
> Of course I think it's difficult to set it up to be as generic as
> possible into gtk but not impossible.
> 
> You can per example make a widget looking like this:
> 
> 
> ```
>    
>   /\
>   ||
>   \/
> 
> 
> ```
> 
>    /\
>   /  \
>  |   \_|_/   |
>  | --|___|-- |
>  |   / | \   |
>  \  /
>   \/
> 
>   
> ```
> 
> A cross to indicate the directions, Inscribe in a circle with
> reactive regions, with a central button.
> 
> 
> I think the best for emulating a gizmo is to take the cross of a
> joystick,
> 
> with 8 directions, and adding a center region to press in/out...
>   
> 
> Once done you can set the increments for every region for X and Y.
> 
> And the action to bind to bind to the central button press button.
> 
> 
> Maybe you can use the inner drag-n-drop mechanic of gtk as base
> for a better control of this widget with the mouse or touch devices.
> 
> Some critics about the Windows compatibility.
> 
> 
> I have seen on this mail list that the bug of the native file chooser
> manifesting by displaying a windows saying that the CD reader device
> is not ready
> comes from the BIOS CD reading capability...???
> 
> I had the same problem but it has fast disappear after some use of my
> music player.
> 
> What's the problem for implementing a native folder chooser in fact ?
> 
> ---
> 
> My first critic rely on the Gio GAppInfo which simply doesn't work.
> 
> Okay I can't set my application as default for content type per
> example,
> 
> but why ?
> 
> Is this due of the underlying GvFS which Windows not implement ?
>   
> the developers of gtk won't make otherwise, they won't touch the hive
> in writing ?
> 
> 
> I don't really care about it.
> 
> It's a hallas to make Windows understand that your program
> 
> take more than one file as argument, once incomportementstalled,
> 
> whereas you can launch it with cmd.exe then it works.
> 
> They tell me I have to build something like COM serv(er|ice) for
> passing more
> than one file as argument to my music player. For making it work
> properly
> for selecting and open with...
> 
> Instead that Windows emulate the cmd.exe to launch a program
> 
> the graphic server (open with) work's otherwise: winshit !
> 
> Good work to the gtk development team but
> 
> stop to change the behavior of some components by every version
> incrementation please.
> 
> I gonna go crazy if I must rewrite parts of all my program due of
> this every time.
> 
> 
> Thanks, best regards,
> 
> mrcyberfighter.
> 

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list