#ifndef KIllustrator_idl_
#define KIllustrator_idl_

#include <openparts.idl>
#include <koffice.idl>
#include <openparts_ui.idl>
 
module KIllustrator {
  interface GfxObject {
    enum ObjectType { 
	Polyline, Ellipse, Polygon, Text, BezierCurve, Group, Pixmap,
	Clipart, Part 
    };

    readonly attribute long id;

    void applyFillColor (in short red, in short green, in short blue);
    void getFillColor (out short red, out short green, out short blue);
    void applyPenColor (in short red, in short green, in short blue);
    void getPenColor (out short red, out short green, out short blue);
    void setPosition (in float x, in float y);
    void getPosition (out float x, out float y);
    void getCenter (out float x, out float y);

    void translate (in float dx, in float dy);
    void rotate (in float angle);
    void rotateAround (in float angle, in float xp, in float yp);

    ObjectType getObjectType ();
    boolean isSelected ();
    GfxObject duplicateObject ();
    void deleteObject ();

    void orderBackOne ();
    void orderForwardOne ();
  };

  interface View : KOffice::View {
    slot void editUndo ();
    slot void editRedo ();
    slot void editCut ();
    slot void editCopy ();
    slot void editPaste ();
    slot void editSelectAll ();
    slot void editDelete ();
    slot void editDuplicate ();
    slot void editProperties ();

    slot void editInsertObject ();
    slot void editInsertClipart ();
    slot void editInsertBitmap ();

    slot void viewOutline ();
    slot void viewNormal ();

    slot void transformPosition ();
    slot void transformDimension ();
    slot void transformRotation ();
    slot void transformMirror ();

    slot void arrangeAlign ();
    slot void arrangeToFront ();
    slot void arrangeToBack ();
    slot void arrangeOneForward ();
    slot void arrangeOneBack ();
    slot void arrangeGroup ();
    slot void arrangeUngroup ();
    slot void arrangeTextAlongPath ();

    slot void editLayers ();
    slot void setupPage ();

    slot void toggleRuler ();
    slot void toggleGrid ();
    slot void toggleHelplines ();

    slot void setupGrid ();
    slot void alignToGrid ();
    slot void setupHelplines ();
    slot void alignToHelplines ();

    slot void toolSelection ();
    slot void toolEditPoint ();
    slot void toolFreehandLine ();
    slot void toolPolyline ();
    slot void toolBezier ();
    slot void toolRectangle ();
    slot void toolPolygon ();
    slot void toolEllipse ();
    slot void toolText ();
    slot void toolZoom ();

    slot void toolMovePoint ();
    slot void toolInsertPoint ();
    slot void toolRemovePoint ();

    slot void configPolygonTool ();
    slot void configEllipseTool ();
	
    slot void setPenColor (in long id);
    slot void setFillColor (in long id);

    slot void zoomSizeSelected (in string size);

    slot void showScripts ();
  };

  typedef sequence<GfxObject> GfxObjectSeq;

  interface Document : KOffice::Document, KOffice::Print {
    boolean checkForSelection ();
    GfxObjectSeq getSelection ();
    void addToSelection (in GfxObject obj);
    void removeFromSelection (in GfxObject obj);

    void groupSelection ();
  };

  interface DocumentFactory : KOffice::DocumentFactory
  {
  };
};

#endif
