FOX-Toolkit

FOX-Toolkit
FOX-Toolkit
Entwickler Entwicklergemeinschaft
Aktuelle Version 1.6.43
(29. Januar 2011)
Betriebssystem X11 (Unix-Derivate), Windows
Kategorie Klassenbibliothek
Lizenz modifizierte LGPL (Freie Software)
Deutschsprachig nein
fox-toolkit.org

FOX ist eine Klassenbibliothek für die plattformübergreifende Programmierung graphischer Benutzeroberflächen (GUIs) in C++. Enthalten sind die für GUI-Bibliotheken üblichen Gestaltungs- und Bedienelemente. Als Besonderheit enthält FOX eine gute Anpassung an die 3D-Bibliothek OpenGL.

Inhaltsverzeichnis

Programmiersprachen

Obgleich das FOX-Toolkit in C++ geschrieben wurde, existieren Sprachanpassungen für

Aussehen

Wo entsprechende Designentscheidungen nötig wurden, ist das Look and Feel von FOX an Windows angelehnt. FOX kann gegenwärtig anders als manch andere Widget-Sets nicht mit Themen versehen werden.

Beispielprogramm

Die Beispielanwendung im Screenshot


Das folgende Beispielprogramm implementiert ein einfaches Fenster mit zwei Knöpfen und einem Text-Label in ihm.

#include "fx.h"
 
class FoxTest : public FXMainWindow
{
  FXDECLARE (FoxTest)
 
  public:
    FoxTest (FXApp* a);
    long onCmdCommand (FXObject*, FXSelector, void*);
    enum
    {
      ID_COMMAND = FXMainWindow::ID_LAST,
      ID_LAST
    };
    virtual void create ();
 
  private:
    FXLabel *label;
 
  protected:
    FoxTest () {}
};
 
FXDEFMAP (FoxTest) FoxTestMap[] = {
    FXMAPFUNC(SEL_COMMAND,    FoxTest::ID_COMMAND,       FoxTest::onCmdCommand),
  };
 
FXIMPLEMENT (FoxTest, FXMainWindow, FoxTestMap, ARRAYNUMBER (FoxTestMap))
 
FoxTest::FoxTest (FXApp *a)
  : FXMainWindow (a, "FoxTest", NULL, NULL, DECOR_ALL, 50, 50, 200, 60)
{
  FXVerticalFrame *vertFrame = new FXVerticalFrame (this,
     LAYOUT_FILL_X|LAYOUT_FILL_Y|PACK_UNIFORM_WIDTH);
  FXHorizontalFrame *horiFrame = new FXHorizontalFrame (vertFrame,
      LAYOUT_CENTER_X|PACK_UNIFORM_WIDTH|FRAME_RAISED);
  new FXButton (horiFrame, "Drück mich", NULL, this, FoxTest::ID_COMMAND);
  new FXButton (horiFrame, "Exit", NULL, getApp (), FXApp::ID_QUIT);
  label = new FXLabel (vertFrame, "Hallo", NULL, LAYOUT_CENTER_X|LAYOUT_CENTER_Y);
}
 
void FoxTest::create ()
{
  FXMainWindow::create ();
  show ();
}
 
long FoxTest::onCmdCommand (FXObject*, FXSelector, void*)
{
  label->setText ("Danke!");
  return 1;
}
 
int main (int argc, char *argv[])
{
  FXApp* application = new FXApp("FoxyTesting","Test");
  application->init (argc, argv);
  new FoxTest (application);
  application->create();
  application->run();
}

Siehe auch

Weblinks


Wikimedia Foundation.

Игры ⚽ Поможем написать реферат

Schlagen Sie auch in anderen Wörterbüchern nach:

  • FOX Toolkit — est une bibliothèque logicielle permettant la réalisation d interface graphiques, FOX signifiant Free Objects for X. Il s agit d un outil libre sous licence LGPL[1] et multiplate forme. Il est en effet disponible sous Windows et pour le système… …   Wikipédia en Français

  • Fox toolkit — Infobox Software name = FOX toolkit caption = FOX applications developer = Jeroen van der Zijp, FOX community latest release version = 1.6.34 (Major stable) latest release date = July 28, 2008 operating system = Cross platform genre = Development …   Wikipedia

  • FOX toolkit — У этого термина существуют и другие значения, см. Fox (значения). FOX Toolkit Тип библ …   Википедия

  • FOX — bezeichnet: einen Fernsehsender in den USA, siehe Fox Network dessen deutsche Sparte Fox Channel die Filmproduktionsfirma 20th Century Fox eine amerikanische Sportartikel Firma für Motocross und Mountainbiking, siehe Fox Racing Inc. eine… …   Deutsch Wikipedia

  • Fox — (engl. Fuchs) bezeichnet: ein TV Network in den USA, siehe Fox Broadcasting Company dessen deutsche Sparte FOX Channel einen amerikanischen Nachrichtensender, siehe Fox News Channel die Filmproduktionsfirma 20th Century Fox (bis 1934: Fox Film… …   Deutsch Wikipedia

  • Toolkit — may refer to an assembly of tools.It may also refer to:* Widget toolkit * Toolkits for User InnovationSpecific toolkits include:* Abstract Window Toolkit * Accessibility Toolkit * Adventure Game Toolkit * B Toolkit * Battlefield Mod Development… …   Wikipedia

  • Fox (значения) — Fox, FOX (англ. лиса): FOX toolkit. Fox Broadcasting Company. Fox (Россия) См. также Fox (БПЛА) …   Википедия

  • Fox (disambiguation) — The fox is a carnivorous animal.Fox may also refer to: Animals * The fox terrier, a dog breed Sport * Cruzeiro Esporte Clube, a Brazilian football team who carry the nickname The Foxes (Portuguese: A Raposa ) * Leicester City FC, an English… …   Wikipedia

  • Toolkit — Sur les autres projets Wikimedia : « Toolkit », sur le Wiktionnaire (dictionnaire universel) Toolkit est un mot anglais qui est utilisé en informatique et le plus souvent dans le contexte des interfaces graphiques. Ce mot, qui… …   Wikipédia en Français

  • Dojo Toolkit — Developer(s) Dojo Foundation Stable release 1.6.1 / May 20, 2011; 5 months ago ( …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”