Re: Scrollable menus, selection in Clist, size of windows, etc...



>  Ok, I understand, and on some applications this is ok, and
>desirable, put sometimes you don't want to have the trouble in
>managing a linked list to see which rows were clicked, in what order,
>which column, etc. I might just want to grab the whole list at a
>time... and since GTK has this already in it's structure why not have
>a nice function that returns all the selected rows' indexs in a GList
>or something.... (just return clist->selection, or maybe a
>copy...)

Somebody else will have to take this up with you. I never use CLists
in this way even though I make extensive use of them. In every case, I
have a pre-existing data structure that is being represented in the
CList, and I have a slightly hard time imagining it any other way.

>I suggest that GtkWindow API should have a wrapper for
>`gdk_window_get_size()`, called `gtk_window_get_size()'. Might even
>make it a macro for efficiency issues. I know it'll be a redudancy,
>but I think it's much more "developer-friendly".

the problem is that there is a class called GtkWindow which has
functions associated with it called "gtk_window_*".

this class is not a wrapper for a GdkWindow, its a top level window
widget. so gtk_window_get_size() is a misleading name.

the only thing that many widgets have in common in this area is that
they have a GdkWindow. But many do not, particularly packing widgets
like GtkContainer and its derivatives.  And very few widget have the
property of is-a or has-a GtkWindow. in fact, there is no equivalent
to a GdkWindow at the GTK level. one option would be
gtk_widget_get_window_size(), but this would be confusing as well,
because there are (as i just mentioned) many widgets that do not have
a GdkWindow. why have a function call for a property that does not belong
to the class ?

etc. as you can hopefully see, its tricky, and for now, i happen to
thing that using gdk_window_get_size() is appropriate, just as 
gdk_input_add() is appropriate. when you're trying to get this
information or perform this action, you're not working at the GTK
level. some things just have to be done at other levels.

--p




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