Beispiel #1
0
void gui_mode::update(){
    /// Clear the menus
    mainWindow()->modeToolbar->clear();
    mainWindow()->modeMenu->clear();

    /// Add the "default" mode action (modes disactivated)
    mainWindow()->modeToolbar->addAction(defaultModeAction);
    mainWindow()->modeMenu->addAction(defaultModeAction);
    modeActionGroup->addAction(defaultModeAction);
    
    /// Re-fill the menu with plugin names and make connections
    foreach(ModePlugin* plugin, pluginManager()->modePlugins()){
        if(!plugin->isApplicable()) continue;
        QAction* action = plugin->action();
        action->setCheckable(true);
        /// Make GUI elements exclusive
        modeActionGroup->addAction(action);
        /// Add to menus and toolbars
        mainWindow()->modeMenu->addAction(action);
        if(!action->icon().isNull())
            mainWindow()->modeToolbar->addAction(action);
    }
    
    /// Remember trackball is always there, thus>1
    bool showtoolbar = (mainWindow()->modeToolbar->children().size() > 1);
    mainWindow()->modeToolbar->setVisible(showtoolbar);
}
void OpenCachingComPlugin::initialize()
{
    OpenCachingComModel *model = new OpenCachingComModel( marbleModel(), pluginManager(), this );
    setModel( model );
    setNumberOfItems( numberOfItemsOnScreen );
    m_isInitialized = true;
}
Beispiel #3
0
/*!
    Creates and returns a QWhereabouts object specified by \a key that will
    read position data from the given \a source. The \a key is either a
    built-in plugin or the class name of a whereabouts plugin
    (see QWhereaboutsPlugin). Note that the keys are case-insensitive.

    If \a key is an empty string, this uses the default plugin, or the first
    known plugin if no default is specified.

    If \a source is an empty string, a default source is used, if possible.
    The default value is determined by the individual plugin.

    \sa QWhereaboutsPlugin
*/
QWhereabouts *QWhereaboutsFactory::create(const QString &key, const QString &source)
{
    if (key.isEmpty()) {
        QSettings settings("Trolltech", "Whereabouts");
        settings.beginGroup("Plugins");
        QString plugin = settings.value("Default").toString();
        if (plugin.isEmpty()) {
            QStringList allKeys = keys();
            if (allKeys.count() == 0 || allKeys[0].isEmpty())
                return 0;
            plugin = allKeys[0];
        }
        return QWhereaboutsFactory::create(plugin);
    }

    if (key.toLower() == "gpsd") {
        if (source.trimmed().isEmpty())
            return new QGpsdWhereabouts;
        // QGpsdWhereabouts will take care of any bad arguments
        QStringList args = source.split(":");
        quint16 port = args.value(1).toUInt();
        return new QGpsdWhereabouts(0, QHostAddress(args.value(0)), port);
    }

    QWhereaboutsPlugin *interface =
            qobject_cast<QWhereaboutsPlugin *>(pluginManager()->instance(key.toLower()));
    if (interface)
        return interface->create(source);
    return 0;
}
void OpenCachingPlugin::initialize()
{
    OpenCachingModel *model = new OpenCachingModel( pluginManager(), this );
    setModel( model );
    setNumberOfItems( numberOfItemsOnScreen );
    readSettings();
    m_isInitialized = true;
}
void EarthquakePlugin::initialize()
{
    EarthquakeModel *model = new EarthquakeModel( pluginManager(), this );
    setModel( model );
    setNumberOfItems( numberOfItemsOnScreen );
    readSettings();
    m_isInitialized = true;
}
Prefs_KeyboardShortcuts::Prefs_KeyboardShortcuts(QWidget* parent, ScribusDoc* doc)
	: Prefs_Pane(parent)
{
	setupUi(this);
	languageChange();

	defMenus=ActionManager::defaultMenus();
	defNonMenuActions=ActionManager::defaultNonMenuActions();

	QVector< QPair<QString, QStringList> >::Iterator itnmenua = defNonMenuActions->begin();
	PluginManager& pluginManager(PluginManager::instance());
	QStringList pluginNames(pluginManager.pluginNames(false));
	ScPlugin* plugin = NULL;
	ScActionPlugin* ixplug = NULL;
	QString pName;
	for (int i = 0; i < pluginNames.count(); ++i)
	{
		pName = pluginNames.at(i);
		plugin = pluginManager.getPlugin(pName, true);
		Q_ASSERT(plugin); // all the returned names should represent loaded plugins
		if (plugin->inherits("ScActionPlugin"))
		{
			ixplug = dynamic_cast<ScActionPlugin*>(plugin);
			Q_ASSERT(ixplug);
			ScActionPlugin::ActionInfo ai(ixplug->actionInfo());
			itnmenua->second << ai.name;
		}
	}

	Q_CHECK_PTR(defMenus);
	lviToActionMap.clear();
	lviToMenuMap.clear();
	keyTable->clear();
	keyMap.clear();
	keyCode = 0;
	keyDisplay->setMinimumWidth(fontMetrics().width("CTRL+ALT+SHIFT+W"));
	keyDisplay->setText("");

	clearSearchButton->setIcon(IconManager::instance()->loadIcon("clear_right.png"));
	// signals and slots connections
	connect( keyTable, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
			 this, SLOT(dispKey(QTreeWidgetItem *, QTreeWidgetItem *)));
	connect( noKey, SIGNAL(clicked()), this, SLOT(setNoKey()));
	connect( setKeyButton, SIGNAL(clicked()), this, SLOT(setKeyText()));
	connect( loadSetButton, SIGNAL(clicked()), this, SLOT(loadKeySetFile()));
	connect( importSetButton, SIGNAL(clicked()), this, SLOT(importKeySetFile()));
	connect( exportSetButton, SIGNAL(clicked()), this, SLOT(exportKeySetFile()));
	connect( resetSetButton, SIGNAL(clicked()), this, SLOT(resetKeySet()));
	connect( clearSearchButton, SIGNAL(clicked()), this, SLOT(clearSearchString()));
	connect( searchTextLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(applySearch(const QString&)));

}
Beispiel #7
0
void LiteApp::aboutPlugins()
{
    PluginsDialog *dlg = new PluginsDialog(this,m_mainwindow);
    foreach (LiteApi::IPluginFactory *factory, pluginManager()->factoryList()) {
        dlg->appendInfo(factory->info());
    }
Beispiel #8
0
bool
KWD::Decorator::enableDecorations (Time timestamp)
{
    QList <WId>::ConstIterator it;
    unsigned int nchildren;
    WId       *children;
    WId       root, parent;
    long int  select;

    mDmSnTimestamp = timestamp;

    if (!pluginManager ()->loadPlugin (""))
	return false;

    updateAllShadowOptions ();

    KWD::trapXError ();
    (void) QApplication::desktop (); // trigger creation of desktop widget
    KWD::popXError ();

    updateShadow ();

    /* FIXME: Implement proper decoration lists and remove this */
    mDecorNormal = new KWD::Window (mCompositeWindow,
                                    QX11Info::appRootWindow (),
                                    0, Window::Default);
    mDecorActive = new KWD::Window (mCompositeWindow,
				    QX11Info::appRootWindow (),
				    0, Window::DefaultActive);

    mActiveId = KWindowSystem::activeWindow ();

    connect (KWindowSystem::self (), SIGNAL (windowAdded (WId)),
	     SLOT (handleWindowAdded (WId)));
    connect (KWindowSystem::self (), SIGNAL (windowRemoved (WId)),
	     SLOT (handleWindowRemoved (WId)));
    connect (KWindowSystem::self (), SIGNAL (activeWindowChanged (WId)),
	     SLOT (handleActiveWindowChanged (WId)));
    connect (KWindowSystem::self (),
	     SIGNAL (windowChanged (WId, const unsigned long *)),
	     SLOT (handleWindowChanged (WId, const unsigned long *)));

    foreach (WId id, KWindowSystem::windows ())
	handleWindowAdded (id);

    /* Find the switcher and add it too
     * FIXME: Doing XQueryTree and then
     * XGetWindowProperty on every window
     * like this is really expensive, surely
     * there is a better way to do this */

    XQueryTree (QX11Info::display (), QX11Info::appRootWindow (),
                &root, &parent, &children, &nchildren);

    for (unsigned int i = 0; i < nchildren; i++)
    {
        if (KWD::readWindowProperty (children[i],
                                     Atoms::switchSelectWindow, &select))
        {
            handleWindowAdded(children[i]);
            break;
        }
    }

    connect (Plasma::Theme::defaultTheme (), SIGNAL (themeChanged ()),
	     SLOT (plasmaThemeChanged ()));

    // select for client messages
    XSelectInput (QX11Info::display (), QX11Info::appRootWindow (),
                  SubstructureNotifyMask |
                  StructureNotifyMask |
                  PropertyChangeMask);

    return true;
}
Beispiel #9
0
/*!
    Returns the list of valid keys that can be passed to create(), i.e. the
    names of the available whereabouts plugins.
*/
QStringList QWhereaboutsFactory::keys()
{
    QStringList keys = pluginManager()->list();
    keys << "gpsd";
    return keys;
}
Beispiel #10
0
void EarthquakePlugin::initialize()
{
    EarthquakeModel *model = new EarthquakeModel( pluginManager(), this );
    setModel( model );
    setNumberOfItems( 20 );
}
Beispiel #11
0
int main( void )
{
	//debug:: lets find the path
#ifdef CRAP_COMPILER_MSVC
	crap::string256 data_path("../../../data/");
#else
	crap::string256 data_path("../data/");
#endif

	//logger
    crap::logger< crap::log_time_time, crap::log_channel_core, crap::log_type_debug, crap::log_target_cout, 512 > unit_logger;

    //system
    crap::System system;

	//lets config
	crap::string256 ini_path = data_path + "configuration.ini";
	crap::Configuration config( 1024*10, 100 );

	config.load( ini_path.c_str() );

	//set config as subsystem
	crap::SubSystem config_sys( "Configuration", &config, &system );

	//taskmanager
	const uint32_t tasksMaxNumber = config.getValue<uint32_t>("TASKS_MAX_NUM");
	const uint32_t tasksDeattachedMaxNumber = config.getValue<uint32_t>("TASKS_DEATTACHED_MAX_NUM");
	crap::TaskManager taskManager( tasksMaxNumber, tasksDeattachedMaxNumber );

	//set TaskManager as Subsystem
	crap::SubSystem tasks_sys( "TaskManager", &taskManager, &system );

	//eventsystem
	const uint32_t eventMaxNumber = config.getValue<uint32_t>("EVENTS_MAX_NUM");
	crap::EventSystem eventSystem( eventMaxNumber );

	//set EventSystem as SubSystem
	crap::SubSystem events_sys( "EventSystem", &eventSystem, &system );

	//resourcemanager
	const uint32_t resoureMemory = config.getValue<uint32_t>("RESOURCE_MEMORY");
	const uint32_t resoureNumber = config.getValue<uint32_t>("RESOURCE_NUMBER");
	const crap::string64 resourceFile = config.getValue<crap::string64>("RESOURCE_FILE");
	const bool resourceXML = config.getValue<uint32_t>("RESOURCE_XML") == 1;

	crap::ResourceManager resourceManager( resoureMemory, resoureNumber, data_path, &system );
	if( resourceXML )
		resourceManager.loadXML( resourceFile );
	else
		resourceManager.loadPackage( resourceFile );

	// set resourcemanager as subsystem
	crap::SubSystem resource_sys( "ResourceManager", &resourceManager, &system );

	//AudioSystem
	const uint32_t audioBufferNumber = config.getValue<uint32_t>("AUDIO_BUFFER_NUM");
	const uint32_t audioSourceNumber = config.getValue<uint32_t>("AUDIO_SOURCE_NUM");
	crap::AudioSystem AudioSystem(audioBufferNumber, audioSourceNumber);

	//set AudioSystem as subsystem
	crap::SubSystem audio_sys( "AudioSystem", &AudioSystem, &system );

	//componentsystem
	const uint32_t componentMemory = config.getValue<uint32_t>("COMPONENT_MEMORY");
	const uint32_t componentMaxNodes = config.getValue<uint32_t>("COMPONENT_MAX_NODES");
	crap::ComponentSystem componentSystem( componentMemory, componentMaxNodes , &system );

	//set componentsystem as subsystem
	crap::SubSystem component_sys( "ComponentSystem", &componentSystem, &system );

	//renderwindow
	const crap::string64 windowName = config.getValue<crap::string64>("RENDER_WINDOW_NAME");
	const uint32_t windowWidth = config.getValue<uint32_t>("RENDER_WINDOW_WIDTH");
	const uint32_t windowHeight = config.getValue<uint32_t>("RENDER_WINDOW_HEIGHT");
	const bool windowFullscreen = config.getValue<uint32_t>("RENDER_WINDOW_FULLSCREEN") == 1;
	const uint32_t windowMaxCallbacks = config.getValue<uint32_t>("RENDER_WINDOW_MAX_CALLBACKS");
	crap::RenderWindow renderWindow( windowMaxCallbacks );
	renderWindow.create( windowName.c_str(), windowWidth, windowHeight, windowFullscreen );

	//renderer
	crap::RenderSystem renderer( &renderWindow );
	renderer.init();

	//set renderer as subsystem
	crap::SubSystem renderer_sys("Renderer", &renderer, &system );

	//inputmanager
	const uint32_t inputMemory = config.getValue<uint32_t>("INPUT_MEMORY");
	crap::InputManager inputManager( inputMemory, renderWindow.getHandle() );

	//add keyboard
	crap::KeyboardInput keyboardInput("Keyboard", 20, &inputManager );
	keyboardInput.addListener<&exitFunc>( thekey, 0, true );

	//add mouse
	crap::MouseInput mouseInput("Mouse", 20, 20, 20, 20, &inputManager );
	mouseInput.addButtonListener<&clickFunc>( 0, 0, true );
	mouseInput.addPositionListener<&posFunc>( true );
	mouseInput.addScrollListener<&scrollFunc>( true );
	mouseInput.addEnterListener<&enterFunc>( true );

	//controller
	crap::ControllerInput controllerInput("Controller", 8, &inputManager );
	uint32_t joyID = controllerInput.leaseJoystickID();
	controllerInput.addAxisListener<&joyAxis>( joyID );
	controllerInput.addButtonListener<&joyButton>( joyID );

	/* Add directory update to taskmanager */
	taskManager.addTask<crap::InputManager, &crap::InputManager::update>("InputPolling", &inputManager, 50, true, false );

	/* Physic system 2D */
	crap::PhysicSystem2D physicSystem2D( 1000, 0.f, 10.f, 8, 2, 1.f/200.f );
	crap::SubSystem physic_sys2d( "PhysicSystem2D", &physicSystem2D, &system );

	taskManager.addTask< crap::PhysicSystem2D, &crap::PhysicSystem2D::update>( "Physic2DUpdate", &physicSystem2D, 20, true, false );

	//pluginmanager
	const uint32_t pluginNumber = config.getValue<uint32_t>("PLUGIN_NUMBER");
	const uint32_t pluginMemory = config.getValue<uint32_t>("PLUGIN_MEMORY");
	crap::PluginManager pluginManager(pluginNumber, pluginMemory, &system );

	//set pluginmanager as subsystem
	crap::SubSystem plugin_sys( "PluginManager", &pluginManager, &system );

	//set Directory listener
	const uint32_t pluginFunctionNumber = config.getValue<uint32_t>("PLUGIN_FUNCTION_NUM");
	const uint32_t pluginFileNumber = config.getValue<uint32_t>("PLUGIN_FILES_NUM");
	const crap::string256 pluginDir = data_path + config.getValue<crap::string64>("PLUGIN_SUBDIRECTORY");
	crap::DirectoryListener pluginDirectoryListener( pluginFunctionNumber, pluginFileNumber, pluginDir, false );
	pluginDirectoryListener.addCallback<crap::PluginManager, &crap::PluginManager::callbackFunction>( &pluginManager );

	/* Add directory update to taskmanager */
	taskManager.addTask<crap::DirectoryListener, &crap::DirectoryListener::update>("PluginPath", &pluginDirectoryListener, 1000, true, false );

	//init this.. (do that at last)
	pluginDirectoryListener.init();

	crap::Configuration* testconf = system.getSubSystem<crap::Configuration>( "Configuration" );
	if( testconf != 0 )
	{
		std::cout << "I've worked! " << testconf->getValue<crap::string64>("SOUND_VOLUME") << std::endl;
	}

	float32_t zero[3] = {0.f, 0.f, 0.f};
	float32_t one[3] = {1.f, 1.f, 1.f};
	float32_t dir[6] = {0.f, 0.f, 1.f, 0.f, 1.f, 0.f };

	crap::AudioSystem* am = system.getSubSystem<crap::AudioSystem>( "AudioSystem" );

	resourceManager.loadResource( "Nagut" );
	uint32_t sid = am->leaseSource( "Nagut" );

	am->setListenerData( zero, zero, dir );
	am->playSource( sid );

//	while( am->getIsPlaying(sid) )
//		crap::sleep_mil_sec(100);

	crap::log( LOG_CHANNEL_CORE | LOG_TYPE_INFO | LOG_TARGET_COUT, "We're done!" );

	crap::Renderer2D renderer2D( &renderWindow, 10, 10, 100 );
	crap::SubSystem renderer2d_sys( "Renderer2D", &renderer2D, &system );

	crap::Context2D* gc = renderer2D.getContext();
	resourceManager.loadResource( "Hasi" );
	resourceManager.loadResource( "Mieze" );
	uint32_t guiImage = renderer2D.getImage2D("Hasi");
	uint32_t guiImage2 = renderer2D.getImage2D("Mieze");

	resourceManager.loadResource("CalcFont");
	crap::Font2D font2d = renderer2D.getFont2D("CalcFont");

	crap::Node* cnode = componentSystem.createNode();
	crap::Component* trans2d = componentSystem.createComponent("Attributes2D", cnode );
	componentSystem.setComponentMember( trans2d, "posX", "600" );
	componentSystem.setComponentMember( trans2d, "posY", "600" );
	componentSystem.setComponentMember( trans2d, "rotation", "20" );
	componentSystem.setComponentMember( trans2d, "scale", "1.f" );
	trans2d->init( &system );


	crap::color_argb colorf;
	colorf.r = 0;
	colorf.b = 0;
	colorf.g = 255;
	colorf.a = 128;

	crap::color_argb colorb;

	//black
	colorb.r = 0;
	colorb.b = 0;
	colorb.g = 0;
	colorb.a = 255;

	crap::color_argb col = crap::argb::black;

	crap::string64 colstr("AABBCCDD");
	uint32_t lolali = strtol("AABBCCDD", 0, 16 );
	crap::color_argb colorino = crap::convert<crap::string64, crap::color_argb>( colstr );

	crap::string64 popo = crap::convert<crap::color_argb, crap::string64>( crap::argb::orange );

	crap::string64 buff = crap::convert<crap::color_argb, crap::string64>(colorf);
	crap::string64 bufb = crap::convert<crap::color_argb, crap::string64>(colorb);

	crap::Component* circle2d = componentSystem.createComponent("RoundedRectangle2D", cnode );

	componentSystem.setComponentMember( circle2d, "width", "150" );
	componentSystem.setComponentMember( circle2d, "height", "200" );
	componentSystem.setComponentMember( circle2d, "corner", "20" );
	componentSystem.setComponentMember( circle2d, "color", buff );
	componentSystem.setComponentMember( circle2d, "border", "5" );
	componentSystem.setComponentMember( circle2d, "borderColor", bufb );

	circle2d->init(&system);

	crap::Node* tnode = componentSystem.createNode();


	crap::Component* trans2dt = componentSystem.createComponent("Attributes2D", tnode );
	componentSystem.setComponentMember( trans2dt, "posX", "200" );
	componentSystem.setComponentMember( trans2dt, "posY", "600" );
	componentSystem.setComponentMember( trans2dt, "rotation", "0" );
	componentSystem.setComponentMember( trans2dt, "scale", "1.f" );
	trans2d->init( &system );

	crap::Component* text2d = componentSystem.createComponent("Text2D", tnode );
	componentSystem.setComponentMember( text2d, "fontName", "CalcFont" );
	componentSystem.setComponentMember( text2d, "text", "Hallo ich bin ein Test" );
	componentSystem.setComponentMember( text2d, "fontSize", "50" );
	componentSystem.setComponentMember( text2d, "color", bufb );
	componentSystem.setComponentMember( text2d, "blur", "1" );

	text2d->init(&system);

	//physic test
	crap::Node* pnode = componentSystem.createNode();
	crap::Component* ptrans2d = componentSystem.createComponent("Attributes2D", pnode );
	componentSystem.setComponentMember( ptrans2d, "posX", "770" );
	componentSystem.setComponentMember( ptrans2d, "posY", "550" );
	componentSystem.setComponentMember( ptrans2d, "rotation", "-0.3f" );
	componentSystem.setComponentMember( ptrans2d, "scale", "1.f" );

	crap::Component* rect2d = componentSystem.createComponent("Rectangle2D", pnode );
	componentSystem.setComponentMember( rect2d, "width", "300" );
	componentSystem.setComponentMember( rect2d, "height", "50" );
	componentSystem.setComponentMember( rect2d, "color", buff );
	componentSystem.setComponentMember( rect2d, "border", "0" );
	componentSystem.setComponentMember( rect2d, "borderColor", bufb );

	crap::Component* phys2d = componentSystem.createComponent("Rectangle2DPhysic", pnode );
	componentSystem.setComponentMember( phys2d, "width", "300" );
	componentSystem.setComponentMember( phys2d, "height", "50" );
	componentSystem.setComponentMember( phys2d, "density", "1.f" );
	componentSystem.setComponentMember( phys2d, "friction", "1.f" );
	componentSystem.setComponentMember( phys2d, "dynamic", "0" );

	ptrans2d->init(&system);
	rect2d->init(&system);
	phys2d->init(&system);

	//solid
	crap::Node* pnode2 = componentSystem.createNode();
	crap::Component* ptrans2d2 = componentSystem.createComponent("Attributes2D", pnode2 );
	componentSystem.setComponentMember( ptrans2d2, "posX", "550" );
	componentSystem.setComponentMember( ptrans2d2, "posY", "400" );
	componentSystem.setComponentMember( ptrans2d2, "rotation", "0.2" );
	componentSystem.setComponentMember( ptrans2d2, "scale", "1.f" );

	crap::Component* rect2d2 = componentSystem.createComponent("Rectangle2D", pnode2 );
	componentSystem.setComponentMember( rect2d2, "width", "300" );
	componentSystem.setComponentMember( rect2d2, "height", "50" );
	componentSystem.setComponentMember( rect2d2, "color", bufb );
	componentSystem.setComponentMember( rect2d2, "border", "0" );
	componentSystem.setComponentMember( rect2d2, "borderColor", bufb );

	crap::Component* phys2d2 = componentSystem.createComponent("Rectangle2DPhysic", pnode2 );
	componentSystem.setComponentMember( phys2d2, "width", "300" );
	componentSystem.setComponentMember( phys2d2, "height", "50" );
	componentSystem.setComponentMember( phys2d2, "density", "1.f" );
	componentSystem.setComponentMember( phys2d2, "friction", "1.f" );
	componentSystem.setComponentMember( phys2d2, "dynamic", "0" );

	ptrans2d2->init(&system);
	rect2d2->init(&system);
	phys2d2->init(&system);

	//circle
	crap::Node* pnode3 = componentSystem.createNode();
	crap::Component* ptrans2d3 = componentSystem.createComponent("Attributes2D", pnode3 );
	componentSystem.setComponentMember( ptrans2d3, "posX", "600" );
	componentSystem.setComponentMember( ptrans2d3, "posY", "50" );
	componentSystem.setComponentMember( ptrans2d3, "rotation", "0" );
	componentSystem.setComponentMember( ptrans2d3, "scale", "1.f" );

	crap::Component* rect2d3 = componentSystem.createComponent("Circle2D", pnode3 );
	componentSystem.setComponentMember( rect2d3, "radius", "20" );
	componentSystem.setComponentMember( rect2d3, "color", "FF0080FF" );
	componentSystem.setComponentMember( rect2d3, "border", "0" );
	componentSystem.setComponentMember( rect2d3, "borderColor", "FF0000F" );

	crap::Component* phys2d3 = componentSystem.createComponent("Cirlce2DPhysic", pnode3 );
	componentSystem.setComponentMember( phys2d3, "radius", "20" );
	componentSystem.setComponentMember( phys2d3, "density", "1.f" );
	componentSystem.setComponentMember( phys2d3, "friction", "1.f" );
	componentSystem.setComponentMember( phys2d3, "dynamic", "1" );

	ptrans2d3->init(&system);
	rect2d3->init(&system);
	phys2d3->init(&system);

	crap::color_argb bord;
	bord.value = 0;
	float32_t rot = 0.f;
	while( running && !renderWindow.shouldClose() )
	{
		renderer.drawBegin();
		renderer2D.drawBegin();
//		crap::drawColoredRectangle( gc, 100.f, 100.f, 100.f, 100.f, -rot*0.1, 255, 0, 255, 255 );
//		//crap::drawColoredCircle( gc, 500.f, (int32_t)(rot*100) % renderWindow.getHeight(), 50.f, 255, 0, 0, 255 );
//		rot += 0.1f;
//		crap::drawColoredRoundedRectangle( gc, 150.f, 150.f, 200.f, 200.f, rot, 0, 0, 255, 128, 20.f );
//
//		crap::drawColorTriangle( gc, 400, 400, 140, 100, 0.f, 0, 255, 0, 255 );
//
//		crap::drawImageRectangle( gc, (int32_t)(rot*10) % renderWindow.getWidth(), 400, 100, 100, rot*0.1, guiImage, 100.f, 100.f, 0.f, 0.f, 0.f, 1.f );
//
//		crap::drawImageCircle( gc, 600, 200, 50, guiImage2, 255, 100.f, 100.f, 0.f, -10,10-rot*2, 0.3f);
//
//		crap::drawText(gc, 400, 400, font2d, "Hallo, du Welt.", 30.f ,0.f , 0, 255, 0, 255, 0, 1, 10.f, crap::align::left);

		bord.value++;
		bord.value %= 100;
		componentSystem.setComponentMember( circle2d, "corner", crap::convert<crap::color_argb, crap::string64>(bord) );
		componentSystem.setComponentMember( text2d, "fontSize", "100" );

		renderer2D.render();

		renderer2D.drawEnd();
		renderer.drawEnd();
		//renderWindow.swap();
		taskManager.update();
	}

	renderer2D.removeImage2D( "Mieze" );
	renderer2D.removeImage2D( "Hasi" );

	renderWindow.destroy();

#ifdef CRAP_COMPILER_MSVC
//    std::cout << "Press a button" << std::endl;
//	getchar();
#endif

	pluginDirectoryListener.removeCallback<crap::PluginManager, &crap::PluginManager::callbackFunction>( &pluginManager );
	pluginManager.unloadAll();

	return 0;
}