gnupic: gpsim development


Previous by date: 6 Jan 2000 23:48:31 -0000 Re: gpsim development, mgoris.csc.com
Next by date: 6 Jan 2000 23:48:31 -0000 Re: gpasm, James Cameron
Previous in thread: 6 Jan 2000 23:48:31 -0000 Re: gpsim development, mgoris.csc.com
Next in thread: 6 Jan 2000 23:48:31 -0000 Re: gpsim development, James Cameron

Subject: Re: gpsim development
From: Anthony Tekatch ####@####.####
Date: 6 Jan 2000 23:48:31 -0000
Message-Id: <00010618401201.01497@lolita>

Have you considered using XML?
 - it's becoming popular http:www.w3.com/XML
 - libxml ftp://ftp.gnome.org/pub/GNOME/stable/sources/libxml/ can parse/save it very easily 
 - xml files can be edited with a text editor 
 - may be viewable with some html/xml viewers   
 - it's used in glade as one example (of many)
 - it should do everything that you want
 - the author of libxml is very active and helpful


Your screen position code could be placed in a "settings.xml" file which could
store all the settings for gpsim. It would look like this:

<?xml version="1.0"?>
<GPSIM Title="GPSIM Settings">
  <ScreenPositions>
    <Screen1>
      <x>100</x>
      <y>200</y>
    </Screen1>
    <Screen2>
      <x>50</x>
      <y>75</y>
    </Screen2>
  </ScreenPositions>
</GPSIM>


At your code initialization you could read the settings file then when you
close your app you could write the settings file back to disk.

See my very preliminary code at:
http://webhome.idirect.com/~tekatch/anthony/picrad/index.html


> First Issue:
> 
> Ralf is working on a feature that will save the window states. Essentially
> he's creating an rc/session manager. We've shot a few ideas back and forth
> and we both like an approach that is implemented in eXode (
> http://simplicity.net/exode/ ), the enhanced X open desktop. Ralf cites an
> example from eXdbm, the database library for eXode.
> 
> The file format looks like this:
> 
> # I am a comment for Variable
> Variable = 12
> 
> FORMAT_LIST {
>    TAR_GZ {
>     Description = "gzipped tar archive"
>     Magic = "\\032\\341"
>     Pattern = "*.tar.gz:*.tgz:*_tar.gz"
>     ViewCommand = "%DEFAULT"
>     EditCommand = "eXtar"
>   }
> 
>   IMAGE {
>     Description = "graphic image"
>     Magic = "%NONE"
>     Pattern = "*.gif":"*.jpg":"*.tga"
>     ViewCommand = "%DEFAULT"
>     EditCommand = "gimp"
>   }
> }
> 
> 
> -------
> The idea is that we'll put the window specific information (e.g. size and
> location) into a structure formatted as shown above. Then we'll use the
> eXdbm code to parse the file. We're not saying that eXdbm will be
> required. Chances are that Ralf will borrow the necessary files and make
> them part of gpsim's distribution.
> 
> Comments?
> 
> Scott
> 
> 



Anthony

Previous by date: 6 Jan 2000 23:48:31 -0000 Re: gpsim development, mgoris.csc.com
Next by date: 6 Jan 2000 23:48:31 -0000 Re: gpasm, James Cameron
Previous in thread: 6 Jan 2000 23:48:31 -0000 Re: gpsim development, mgoris.csc.com
Next in thread: 6 Jan 2000 23:48:31 -0000 Re: gpsim development, James Cameron


Powered by ezmlm-browse 0.20.