Hey,

Have you thought about using multiple GtkStacks and switching with a
GtkStackSwitcher? Take a look at "Stack" on the gtk3-demo application.

On Sat, May 9, 2015 at 12:27 PM, Mike South <mso...@gmail.com> wrote:
> I'm using Perl GTK on a debian-based distro.  My app is the only
> user-visible thing running.
>
> The app is logically organized into "screens".  A "run" screen (which is
> showing most of the time), a "menu" screen (with buttons to change things),
> a "help" screen (shows text describing app function).
>
> I am an experienced perl programmer, but a complete GTK newbie.  When I
> "switch screens", I hide/remove the widgets I had previously added, and
> build the screen I need to show (by adding the appropriate widgets for that
> screen to the window).
>
> It's a pretty simple app, almost all of what it does is display text, so
> the drawing time is not really an issue.
>
> However, I'm pretty sure this is not how to do this.
>
> Details of my (probably bad) current implementation:
>
> I have a single window:
>
>     my $window = Gtk2::Window->new('toplevel');
>
> I set that window to full screen:
>
>     $window->fullscreen;
>
> Then, when I "switch screens" in the application, I remove/hide widgets
> currently showing, and create and add the widgets for the current view (I'm
> sorry if you just threw up in your mouth a little when reading that.)
>
> There is no mouse or keyboard--I have to switch screens manually in
> response to other things in the environment (voltage on gpio pins).
>
> What should I be doing?  Should each "screen" of the app be its own
> $window, with the widgets generated once, then ->show and ->hide on the
> $windows to switch between screens?  Will multiple toplevel, fullscreen
> windows coexist ok?  But, more importantly, is that "the way" to do it, as
> in, the way an experienced GTK developer would do it?  Or is there
> something like panes/views/whatever that are children of windows, and I
> should be switching between them?
>
> Thanks, and sorry for the complete newbieness of the question.
>
> Pointers to documentation I may have missed in my searching are also
> welcome.
>
> mike
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to