RESIZABLE TOOLBAR and ICONS REARRANGEMENT.

View: New views
4 Messages — Rating Filter:   Alert me  

RESIZABLE TOOLBAR and ICONS REARRANGEMENT.

by pampryl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In the Gimp, there is a toolbar which contains exclusively icons.

These icons display a tooltip when the mouse hovers on them :
"Select rectangular regions", "Add text to the image", etc ...

I am interested in the toolbar's ability to get automatically
resized along with the panel which contains it :
when the panel is resized, the toolbar is also resized and the icons
inside are reorganised on a number of lines and columns which varies
according to the room given to the toolbar in width and height.

To make things clear : suppose you reduce the width of the panel,
then the toolbar's width is also reduced and then fewer icons can
be displayed on a single line. So the right-hand icons are shifted
from line N to line N+1 on the left side.

Is this kind of toolbar a specific component of GTK+ ?
Where can I find the source code of this component either
in GTK+ or the Gimp ?

I am waiting for your suggestions with great impatience.

Re: RE SIZABLE TOOLBAR and ICONS REARRANGEMENT.

by Martin Nordholts-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

pampryl wrote:
> In the Gimp, there is a toolbar which contains exclusively icons.
>
> Is this kind of toolbar a specific component of GTK+ ?
> Where can I find the source code of this component either
> in GTK+ or the Gimp ?
>
>  

Hi

The toolbox logic is implemented in GIMP, have a look in
app/widgets/gimptoolbox.c and more specifically
gimp_toolbox_size_allocate().

- Martin
_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: RE SIZABLE TOOLBAR and ICONS REARRANGEMENT.

by Bill Skaggs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> pampryl wrote:
>> In the Gimp, there is a toolbar which contains exclusively icons.
>>
>> Is this kind of toolbar a specific component of GTK+ ?
>> Where can I find the source code of this component either
>> in GTK+ or the Gimp ?

The code makes use of a widget called GtkWrapBox, from which two
other widgets are derived, GtkHWrapBox and GtkVWrapBox.  In spite of
the names, they are not part of Gtk, only of Gimp.  (I believe the code was
written with the intention of adding it to Gtk, but wasn't accepted.)

You can find the code for the widgets in the app/widgets directory of
the Gimp source, if you are interested.

  -- Bill
_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: problem solved

by pampryl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks a lot Bill, the GtkWrapBox is exactly what I need.
 
Pampryl
LightInTheBox - Buy quality products at wholesale price