ILOG
Welcome, Guest | Sign In


Blogs | Forums | Worldwide sites | Contact us

title element1
Product Info
Features
Tutorial
Datasheet
Supported platforms
Technical Forum
Solutions
Customers
News & Events
Press releases
Trial & Purchase
Demos
Evals
Contact info
Tutorial  

2D Graphics

// STEP 1
// Creation of a manager, a view, and a graphic object

#include <ilviews/manager/manager.h>
#include <ilviews/graphics/rectangl.h>

static void Quit(IlvView* view, IlvAny)
{
   delete view->getDisplay();;
   IlvExit(0);
}

int main(int argc, char** argv)
{
   // Creation of the Display
   IlvDisplay* display = new IlvDisplay("EvalKitStep1");
   // Creation of the Manager
   IlvManager* manager = new IlvManager(display);
   // Creation of the first view
   IlvView* view = new IlvView(display, "View1", "Main View - Step 1", IlvRect(0,0,300,200));
   // Attach the view to the manager
   manager->addView(view);

   // Creation of a graphic object (a filled rectangle)
   IlvFilledRectangle* rectangle = new IlvFilledRectangle(display, IlvRect(20,20,40,30));
   // Add this object in the manager
   manager->addObject(rectangle);

   // Add an exit callback so that the exit button is valid
   view->setDestroyCallback(Quit);
   // Run the event loop
   IlvMainLoop();
   return 0;
}


 

Back to Step 1 presentation

Learn More
    Features  
    Charts  
    Maps  
    Graph Layout  
    Controls  
    Data Access  
    Gantt Chart  
     
ILOG JViews Diagrammer
(includes Graph Layout)
ILOG JViews Maps
ILOG JViews Gantt
ILOG JViews Charts
ILOG JViews Telecom Graphic Objects
ILOG JViews Maps for Defense
Customer Spotlight
   
     
 
 
element3