Re: [gtk-list] GtkMDI Ideas and questions.
- From: Chris Phelps <chicane reninet com>
- To: Adrian Feiguin <feiguin magnet fsu edu>, gtk-list redhat com
- Subject: Re: [gtk-list] GtkMDI Ideas and questions.
- Date: Mon, 24 Jan 2000 18:27:01 -0800
Adrian Feiguin wrote:
> Hi Chris, It seems that you forgot to add the gtk-list in the
> recipients... ;)
Bloody hell...I did that w/ Owen last week too :o)
> After a bit more thought, I am leaning toward a GtkFixed widget as the
> main window. It seems that using that would make things very easy for moving
> the windows around.
> The subwindows would most likely be GTK_WINDOW_POPUP's, tho I have not yet
> figured out how to make them only draw inside another widget, so i may have
> to make my own widget for that.
>
> I insist that gtklayout is the best option. You can draw your child
> widgets (popup windows) anywhere in the layout->bin_window, and you don't
> have to deal with the allocation and scrollbars. it definitelly make
> things much easier. Take a look at the API.
I did just that after the first time you mentioned it this morning, and it does
appears that you are right. I have some generic code now that puts frames with
some buttons (maximize, close etc) and then sticks them into the layout widget.
The problem is, what do i do about stacking, like raising the frame and such? Can
i just queue a redraw, and have it be on top or something easy like that?
I tried windows, (POPUP) but they can be put into other widgets AFAIK, so thats a
bust.
> The frame would be just like any other popup window (menus and stuff), with 3
> standard gtk buttons in the top righthand corner (minimize, restore, close).
> The window name area would be where the window could be 'picked up' and
> dragged around.
>
> A good idea would be creating a window subclass for the subwindows:
> gtkmdiwindow (?) (suppousing that youcall your widget "gtkmdi"). Your main
> window should be a kind of canvas. You can take a look to
> gtkplotlayout/canvas as an easy example of how you can do it
> (magnet.fsu.edu/~feiguin/gtk) You'd have to create default pixmaps for the
> decorations, but It would be great if you add a function allowing the user
> to customize them.
Easy enough i suppose :o)
I think I have a better idea of what I am going to do now. First off, its going to
be called gtkwiw (window in window), rather than mdi...I'll do the mdi stuff later
like this:
gtk_mdi_new(GtkMDIStyle style) ->
typedef enum{
GTK_MDI_STYLE_TOPLEVEL,
GTK_MDI_STYLE_NOTEBOOK,
GTK_MDI_STYLE_WIW
};GtkMDIStyle;
I think this will be a ton more funtional than the gnome mdi setup, and would
allow you to do all kinds of things that you normally couldnt do with gtk.
>
> I dont know how to tell if the mouse is currently pressed down
> either...definatly need to figure that out too, so i can make the routine
> that tells the GtkFixed where to set the window down, or where to draw it
> while dragging (most likely will be opaque)
>
> Easy, use button_press/relase events to determine
> whether the mouse is pressed or not. You'll have to
> use gdk_grab_pointer and gdk_window_get_pointer to get the position of the
> cursor. You can also take a look at gtkiconlist
> (magnet.fsu.edu/~feiguin/gtk) to see how gtklayout works.
Great, i'll do that...hopefully there will be something about the raising of
objects and stuff.
-Chicane
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]