Web lists-archives.com

Advice - custom container or custom widget

Hi all,

I'm after some advice about the best way to implement part of the GUI
for my application.  I'm not sure whether a custom GTK container is the
way to go, or whether a custom widget would be better.

The application will be for scanning hardcopy documents, then
manipulating the pages before exporting them into an electronic filing
system.  The idea is to scan a stack of paper then split the collection
of pages into individual documents, by using the arrow keys to move
between pages and pressing enter to split the document, the same way
you might split a long string of text into multiple lines in a text
editor (with each line being a new document).

I have investigated the custom container option, however I'm not sure
this is the best solution as it seems more about controlling the
arrangement of widgets, and seems designed more toward the handling
of any widget whereas I will only be storing a single type of widget
(one showing a thumbnail of a single scanned page.)

I am currently thinking of implementing a custom widget instead,
loosely based on the idea of an icon list.  An icon list displays a
single type of widget (an icon) repeated multiple times, which is what
my interface needs to do also.  Typically these widgets have some kind
of model behind them though, rather than adding items to the widget
directly, so I am guessing I would use a TreeStore with only two
levels - the documents sit at the top, and then each page within the
document is a child of each document row.

There is some documentation about custom containers, but I haven't
found much about how to use an existing model with a custom widget, so
I'm not sure whether this is just because it doesn't come up very
often, or whether it's an ill-advised approach.

Would this be a good method of implementing this type of widget?  Or
would it be better (if it's even possible) to extend some other widget
like an icon list instead?

Thanks in advance for any advice!


gtk-list mailing list