Re: [gtk-list] Creating objects in gtk+ ??




Bawer Dagdeviren <chamele0n@geocities.com> writes:

> Hello to all of you!
> I have a question that might seem a bit too general, but I'll go ahead
> and ask it anyways =)
> How does one go about to create a new object in gtk? Do I have to know
> about Xlib (I don't) in order to be able to do this? To be honest the
> source-code for gtk doesn't make me any smarter, I would REALLY like it
> if someone could make an overview of all the objects and the object-tree
> (inheritance etc.) in gtk.
> As I said I know that this question may be too general to be answered,
> but if someone tried to answer it I would be one happy lad! :)

I'm afraid there isn't a lot of documentation on making new widgets
yet. (There isn't even much documentation on using widgets...) Do take
a look at the stuff in the docs directory though - there's some useful
information on the object system and signals already. The best way to
start out is to take an existing widget and try modifying it a bit. If
you run into problems, ask lots of questions here - other people will
doubtless find the answers useful as well. (Including the people doing
the answering...)

In theory. you don't have to know about Xlib because gtk is based on
gdk, which is a wrapper around Xlib. On the other hand, it's a fairly
thin wrapper, so you'll need to have (or acquire) at least a basic
knowledge of some Xlib concepts. But you're pretty well isolated from
a lot of the grunt work.
                                        Owen

P.S. It isn't complete (and is outdated) but here's a list of the
objects in gtk that I made at one point, if that was what you were
asking for. No descriptions, but I've found it useful. You might be
able to do better automatically with gtk_type_describe_tree.


* object
** data
*** adjustment


** widget
*** container
**** bin
***** frame
***** window
****** canvas
****** filesel
****** dialog
***** alignment
***** item
****** listitem
****** menuitem
******* checkmenuitem
******** radiomenuitem
****** treeitem
***** viewport

**** box
***** hbox
***** vbox

**** button
***** optionmenu
***** togglebutton
****** checkbutton
******* radiobutton

**** list

**** menushell
***** menu
***** menubar

**** notebook

**** scrolledwindow

**** table

**** tree

*** entry

*** preview

*** range
**** scale
***** hscale
***** vscale
**** scrollbar
***** hscrollbar
***** vscrollbar

*** text

*** drawingarea

*** misc
**** label
**** arrow
**** image
**** pixmap

*** progressbar

*** ruler
**** hruler
**** vruler

*** separator
**** hseparator
**** vseparator



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]