URLs, an implementation
Posted: 04.08.2002, 16:53
I now have a working URL implementation.
I've added the following public methods to CelestiaCore:
std::string getUrl() const;
void gotoUrl(const std::string& url);
void addToHistory();
void back();
void forward();
const std::vector<std::string>& getHistory() const;
std::vector<std::string>::size_type getHistoryCurrent() const;
It should compile on any ANSI compiler, but I haven't tested on anything else but gcc 2.96 (Mandrake 8.2).
I've also added a construtor and a method to the BigFix class (they show up in base64 in the URL).
Here is what a URL looks like:
cel://Fallow/Sol:Earth:Moon/2002-08-04T ... Hi4mkG7IDA
&y=e/yPGGXUEA&z=ZenTHpckZdkL&ow=-0.009347&ox=0.228147
&oy=0.973347&oz=0.021382&select=Sol:Earth:Moon&fov=27.941454
&ts=1.000000&rf=5523&lm=0
Nothing fancy but it works well enough.
The code is not optimised at all, it's a proof of concept more than anything else.
The code is available as a patch against 1.2.4 along with the KDE interface:
http://www.teyssier.org/~chris/celestia ... e.diff.bz2
To compile it (KDE3 required):
- Get the official 1.2.4 tar file
> tar xvzf celestia-1.2.4.tar.gz
> cd celestia-1.2.4
> bizp2 ../celestia-1.2.4_url_kde.diff.bz2 | patch -p1
> automake ; autoconf (2.5 requiered by KDE3)
> ./configure --with-kde (--with-gnome should still work but you can't use both)
> make
> sudo make install (data files will go to $KDEDIR/share/apps/celestia, so you do have to make install even if you already have celestia installed)
It's alpha quality at the moment, some things don't work (bookmarks), but I still find it more fonctional than the Gnome version (I'm biased):
- it has a full screen mode
- it can open script files
- preferences are saved
- and it's got a working history !
Screenshot, this is what you will see if you 'GoTo' the above URL:
Christophe
I've added the following public methods to CelestiaCore:
std::string getUrl() const;
void gotoUrl(const std::string& url);
void addToHistory();
void back();
void forward();
const std::vector<std::string>& getHistory() const;
std::vector<std::string>::size_type getHistoryCurrent() const;
It should compile on any ANSI compiler, but I haven't tested on anything else but gcc 2.96 (Mandrake 8.2).
I've also added a construtor and a method to the BigFix class (they show up in base64 in the URL).
Here is what a URL looks like:
cel://Fallow/Sol:Earth:Moon/2002-08-04T ... Hi4mkG7IDA
&y=e/yPGGXUEA&z=ZenTHpckZdkL&ow=-0.009347&ox=0.228147
&oy=0.973347&oz=0.021382&select=Sol:Earth:Moon&fov=27.941454
&ts=1.000000&rf=5523&lm=0
Nothing fancy but it works well enough.
The code is not optimised at all, it's a proof of concept more than anything else.
The code is available as a patch against 1.2.4 along with the KDE interface:
http://www.teyssier.org/~chris/celestia ... e.diff.bz2
To compile it (KDE3 required):
- Get the official 1.2.4 tar file
> tar xvzf celestia-1.2.4.tar.gz
> cd celestia-1.2.4
> bizp2 ../celestia-1.2.4_url_kde.diff.bz2 | patch -p1
> automake ; autoconf (2.5 requiered by KDE3)
> ./configure --with-kde (--with-gnome should still work but you can't use both)
> make
> sudo make install (data files will go to $KDEDIR/share/apps/celestia, so you do have to make install even if you already have celestia installed)
It's alpha quality at the moment, some things don't work (bookmarks), but I still find it more fonctional than the Gnome version (I'm biased):
- it has a full screen mode
- it can open script files
- preferences are saved
- and it's got a working history !
Screenshot, this is what you will see if you 'GoTo' the above URL:
Christophe