/*
 * Copyright (c) 2016 martin_id@vodafone.co.nz
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

#include <cluttermm.h>
/**
 * A minimalist program to show cluttermm capability for an actor to be composed
 * from a collection of other actors.
 */
int main(int argc, char** argv)
{
  Clutter::init(&argc, &argv);

 Glib::RefPtr<Clutter::Stage> stage = Clutter::Stage::create();
 stage->set_user_resizable (true);

 Glib::RefPtr<Clutter::Actor> actor = Clutter::Actor::create();
 // set the bounding box of the actor
 actor->set_position ( 0, 0);
 actor->set_size (480, 640);

 // set the background color of the actor
 actor->set_background_color (Clutter::Color(Clutter::COLOR_ORANGE));

 // set the bounding box of the child, relative to the parent
 Glib::RefPtr<Clutter::Actor> child = Clutter::Actor::create();
 child->set_position ( 20, 20);
 child->set_size ( 80, 240);

 // set the background color of the child
 child->set_background_color ( Clutter::Color(Clutter::COLOR_BLUE));

 // add the child to the actor
 stage->add_child (actor);
 actor->add_child ( child);

  // Show the stage:
  stage->show();

  // Start the main loop, so we can respond to events:
  Clutter::main();

  return 0;
}
