Überblick
Beispiele
Schnappschüsse
Vergleiche
Anwendungen
Herunterladen
Documentation
Basar
Status & Fahrplan
Häufig gestellte Fragen
Autoren & Lizenz
Forum
Ultimate++ finanziell unterstützen
Diese Seite durchsuchen
Sprache
Deutsch











SourceForge.net Logo



HelloWorld

 

Rudimentary HelloWorld application with menu and status bar

 

 

hello.cpp

 

#include <CtrlLib/CtrlLib.h>

 

using namespace Upp;

 

class HelloWorld : public TopWindow {

    MenuBar menu;

    StatusBar status;

 

    void FileMenu(Bar& bar);

    void MainMenu(Bar& bar);

    void About();

 

public:

    typedef HelloWorld CLASSNAME;

 

    HelloWorld();

};

 

void HelloWorld::About()

{

    PromptOK("{{1@5 [@9= This is the]::@2 [A5@0 Ultimate`+`+ Hello world sample}}");

}

 

void HelloWorld::FileMenu(Bar& bar)

{

    bar.Add("About..", THISBACK(About));

    bar.Separator();

    bar.Add("Exit", THISBACK(Close));

}

 

void HelloWorld::MainMenu(Bar& bar)

{

    menu.Add("File", THISBACK(FileMenu));

}

 

HelloWorld::HelloWorld()

{

    AddFrame(menu);

    AddFrame(status);

    menu.Set(THISBACK(MainMenu));

    status = "Welcome to the Ultimate++ !";

}

 

GUI_APP_MAIN

{

    SetLanguage(LNG_ENGLISH);

    HelloWorld().Run();

}

 

 

 

 

Diese Seite gibt es auch in english, català, čeština, español, euskara, français, română, русский, 中文(简体) und 中文(繁體). Willst du mitmachen?