Doing a good job porting
- From: Jonathan Hayward <christos jonathan hayward gmail com>
- To: gtk-list gnome org
- Subject: Doing a good job porting
- Date: Wed, 27 Jul 2005 09:40:24 -0500
I have a program that I wrote on Linux (text/ncurses), ported to Mac
with some simple graphics added, and am now trying to get working under
GTK. I'm realizing that I want to see a properly GTK way of doing
things instead of trying to use GTK to re-implement the Mac GUI.
The program's window was originally broken up into several ncurses
subwindows: a scrolling text area at the top, areas with stats at the
left and other status information at the bottom, and an overhead map,
the dungeon window in the large center area left over. When I ported it
to Mac I broke everything down into "paint this character at these
coordinates" except the dungeon window, which I painted with tiled
icons (potentially more than one at a given tile space: the ground icon
and an item's icon, for instance).
Sometimes the window is emptied and the whole window is used for scrolling text.
I'd be interested in advice on what the best way to do the same work in GTK is. At present I'm thinking about:
At top, a scolling, non-editable text area.
At the left and bottom, labels arranged from top to bottom which are
kept up to date. (Question: Is it possible to change the text of a
label once it's been added?)
At the center, a grid implemented with packing boxes, each box
containing a tile created by superimposing one or more 16x16 pixel
icons. This should be as large as it can be. (How can I find out how
much space a packing box can potentially contain?)
Use a popup window for what I covered with the whole screen being used for scrolling text.
I think this would be using GTK better, but I'd welcome feedback on how to improve this design.
Thank you,
--
++ Jonathan Hayward,
jonathan hayward pobox com** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at
http://JonathansCorner.com** If you'd like a Google Mail (
gmail.com) account, please tell me!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]