This file is indexed.

/usr/include/goocanvasmm-2.0/goocanvasmm/item.h is in libgoocanvasmm-2.0-dev 1.90.11-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
// -*- c++ -*-
// Generated by gmmproc 2.46.1 -- DO NOT MODIFY!
#ifndef _GOOCANVASMM_ITEM_H
#define _GOOCANVASMM_ITEM_H


#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>


/* Copyright (C) 1998-2006 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <goocanvasmm/bounds.h>
#include <goocanvasmm/enums.h>
#include <goocanvasmm/style.h>
#include <cairomm/cairomm.h>
#include <glibmm/interface.h>
#include <goocanvasitem.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" { typedef union _GooCanvasPathCommand GooCanvasPathCommand; }
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GooCanvasItem GooCanvasItem;
typedef struct _GooCanvasItemClass GooCanvasItemClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Goocanvas
{ class Item_Class; } // namespace Goocanvas
#endif // DOXYGEN_SHOULD_SKIP_THIS

namespace Goocanvas
{

class Canvas ;
class ItemModel ;


class Item : public Glib::Interface
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef Item CppObjectType;
  typedef Item_Class CppClassType;
  typedef GooCanvasItem BaseObjectType;
  typedef GooCanvasItemIface BaseClassType;

  // noncopyable
  Item(const Item&) = delete;
  Item& operator=(const Item&) = delete;

private:
  friend class Item_Class;
  static CppClassType item_class_;

#endif /* DOXYGEN_SHOULD_SKIP_THIS */
protected:
  /**
   * You should derive from this class to use it.
   */
  Item();

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  /** Called by constructors of derived classes. Provide the result of 
   * the Class init() function to ensure that it is properly 
   * initialized.
   * 
   * @param interface_class The Class object for the derived type.
   */
  explicit Item(const Glib::Interface_Class& interface_class);

public:
  // This is public so that C++ wrapper instances can be
  // created for C instances of unwrapped types.
  // For instance, if an unexpected C type implements the C interface. 
  explicit Item(GooCanvasItem* castitem);

protected:
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:

  Item(Item&& src) noexcept;
  Item& operator=(Item&& src) noexcept;

  virtual ~Item() noexcept;

  static void add_interface(GType gtype_implementer);

  /** Get the GType for this class, for use with the underlying GObject type system.
   */
  static GType get_type()      G_GNUC_CONST;

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GObject.
  GooCanvasItem*       gobj()       { return reinterpret_cast<GooCanvasItem*>(gobject_); }

  ///Provides access to the underlying C GObject.
  const GooCanvasItem* gobj() const { return reinterpret_cast<GooCanvasItem*>(gobject_); }

private:


public:

  
  /** Returns: the Goo::Canvas.
   * 
   * @return The Goo::Canvas.
   */
  Canvas* get_canvas();
  
  /** Returns: the Goo::Canvas.
   * 
   * @return The Goo::Canvas.
   */
  const Canvas* get_canvas() const;
  // TODO: should this be passed by reference instead of by pointer?
  
  /** This function is only intended to be used when implementing new canvas
   * items, specifically container items such as Goo::CanvasGroup.
   * 
   * It sets the canvas of the item.
   * 
   * @param canvas A Goo::Canvas.
   */
  void set_canvas(Canvas* canvas);

  
  /** Checks if the item is visible.
   * 
   * This entails checking the item's own visibility setting, as well as those
   * of its ancestors.
   * 
   * Note that the item may be scrolled off the screen and so may not
   * be actually visible to the user.
   * 
   * @return <tt>true</tt> if the item is visible.
   */
  bool is_visible() const;

  
  /** Gets the model of the given canvas item.
   * 
   * @return The item's model, or <tt>0</tt> if it has no model.
   */
  Glib::RefPtr<ItemModel> get_model();
  
  /** Gets the model of the given canvas item.
   * 
   * @return The item's model, or <tt>0</tt> if it has no model.
   */
  Glib::RefPtr<const ItemModel> get_model() const;
  
  /** Sets the model of the given canvas item.
   * 
   * @param model A Goo::CanvasItemModel.
   */
  void set_model(const Glib::RefPtr<ItemModel>& model);

  
  /** Gets the parent of the given item.
   * 
   * @return The parent item, or <tt>0</tt> if the item has no parent.
   */
  Glib::RefPtr<Item> get_parent();
  
  /** Gets the parent of the given item.
   * 
   * @return The parent item, or <tt>0</tt> if the item has no parent.
   */
  Glib::RefPtr<const Item> get_parent() const;
  
  /** This function is only intended to be used when implementing new canvas
   * items (specifically container items such as Goo::CanvasGroup).
   * It sets the parent of the child item.
   * &lt;!--PARAMETERS--&gt;
   * &lt;note&gt;&lt;para&gt;
   * This function cannot be used to add an item to a group
   * or to change the parent of an item.
   * To do that use the Goo::CanvasItem::property_parent() property.
   * &lt;/para&gt;&lt;/note&gt;
   * 
   * @param parent The new parent item.
   */
  void set_parent(const Glib::RefPtr<Item>& parent);
  
  /** Removes an item from its parent. If the item is in a canvas it will be
   * removed.
   * 
   * This would normally also result in the item being freed.
   */
  void remove();

  
  /** Tests to see if the given item is a container.
   * 
   * @return <tt>true</tt> if the item is a container.
   */
  bool is_container() const;
  
  /** Gets the number of children of the container.
   * 
   * @return The number of children.
   */
  int get_n_children() const;
  
  /** Gets the child item at the given stack position.
   * 
   * @param child_num The position of a child in the container's stack.
   * @return The child item at the given stack position, or <tt>0</tt> if @a child_num
   * is out of range.
   */
  Glib::RefPtr<Item> get_child(int child_num);
  
  /** Gets the child item at the given stack position.
   * 
   * @param child_num The position of a child in the container's stack.
   * @return The child item at the given stack position, or <tt>0</tt> if @a child_num
   * is out of range.
   */
  Glib::RefPtr<const Item> get_child(int child_num) const;
  
  /** Attempts to find the given child item with the container's stack.
   * 
   * @param child The child item to find.
   * @return The position of the given @a child item, or -1 if it isn't found.
   */
  int find_child(const Glib::RefPtr<Item>& child);
  
  /** Adds a child item to a container item at the given stack position.
   * 
   * @param child The item to add.
   * @param pos The position of the item, or -1 to place it last (at the top of
   * the stacking order).
   */
  void add_child(const Glib::RefPtr<Item>& child, int pos);
  void add_child(const Glib::RefPtr<Item>& child);

  
  /** Gets a child property of @a child.
   * 
   * @param child A child Goo::CanvasItem.
   * @param property_name The name of the child property to get.
   * @param value A location to return the value.
   */
  void get_child_property_value(const Glib::RefPtr<Item>& child, const Glib::ustring& property_name, Glib::ValueBase& value) const;
  
  /** Sets a child property of @a child.
   * 
   * @param child A child Goo::CanvasItem.
   * @param property_name The name of the child property to set.
   * @param value The value to set the property to.
   */
  void set_child_property_value(const Glib::RefPtr<Item>& child, const Glib::ustring& property_name, const Glib::ValueBase& value);
  
  
  template <class PropertyType>
  void get_child_property(const Glib::RefPtr<Item>& child, const Glib::ustring& the_property_name, PropertyType& value) const;

  template <class PropertyType>
  void set_child_property(const Glib::RefPtr<Item>& child, const Glib::ustring& the_property_name, const PropertyType& value);

  
  /** Moves a child item to a new stack position within the container.
   * 
   * @param old_position The current position of the child item.
   * @param new_position The new position of the child item.
   */
  void move_child(int old_position, int new_position);
  
  /** Removes the child item at the given position.
   * 
   * @param child_num The position of the child item to remove.
   */
  void remove_child(int child_num);

  
  /** Raises an item in the stacking order.
   * 
   * @param above The item to raise @a item above, or <tt>0</tt> to raise @a item to the top
   * of the stack.
   */
  void raise(const Glib::RefPtr<Item>& above);

  /** Raise the item to the top of the stack.
   */
  void raise();

  
  /** Lowers an item in the stacking order.
   * 
   * @param below The item to lower @a item below, or <tt>0</tt> to lower @a item to the
   * bottom of the stack.
   */
  void lower(const Glib::RefPtr<Item>& below);

  /** Lower the item to the bottom of the stack.
   */
  void lower();

  Bounds get_bounds() const;
  

  /** This function is only intended to be used when implementing new canvas
   * items.
   * 
   * It requests that an update of the item is scheduled. It will be performed
   * as soon as the application is idle, and before the canvas is redrawn.
   */
  void request_update();
  
  /** This function is only intended to be used when implementing new canvas
   * items.
   * 
   * It updates the canvas immediately, if an update is scheduled.
   * This ensures that all item bounds are up-to-date.
   */
  void ensure_updated();
  
  /** This function is only intended to be used when implementing new canvas
   * items, specifically container items such as Goo::CanvasGroup.
   * 
   * Updates the item, if needed, and any children.
   * 
   * @param entire_tree If the entire subtree should be updated.
   * @param context A cairo context.
   * @param bounds A Goo::CanvasBounds to return the new bounds in.
   */
  void update(bool entire_tree, const Cairo::RefPtr<Cairo::Context>& context, Bounds& bounds);
  
  /** This function is only intended to be used when implementing new canvas
   * items, specifically container items such as Goo::CanvasGroup.
   * 
   * It paints the item and all children if they intersect the given bounds.
   * 
   * Note that the @a scale argument may be different to the current scale in the
   * Goo::CanvasItem, e.g. when the canvas is being printed.
   * 
   * @param context A cairo context.
   * @param bounds The bounds that need to be repainted.
   * @param scale The scale to use to determine whether an item should be painted.
   * See Goo::CanvasItem::property_visibility_threshold().
   */
  void paint(const Cairo::RefPtr<Cairo::Context>& context, const Bounds& bounds, double scale);
  
  /** This function is only intended to be used when implementing new canvas
   * items, specifically layout items such as Goo::CanvasTable.
   * 
   * It gets the requested area of a child item.
   * 
   * @param context A cairo context.
   * @param bounds A Goo::CanvasBounds to return the requested area in, in the
   * parent's coordinate space.
   * @return <tt>true</tt> if the item should be allocated space.
   */
  bool get_requested_area(const Cairo::RefPtr<Cairo::Context>& context, Bounds& bounds) const;
  
  /** This function is only intended to be used when implementing new canvas
   * items, specifically layout items such as Goo::CanvasTable.
   * 
   * It gets the requested height of a child item, assuming it is allocated the
   * given width. This is useful for text items whose requested height may change
   * depending on the allocated width.
   * 
   * @param context A cairo context.
   * @param width The width that the item may be allocated.
   * @return The requested height of the item, given the allocated width,
   * or %-1 if the item doesn't support this method or its height doesn't
   * change when allocated different widths.
   */
  double get_requested_height(const Cairo::RefPtr<Cairo::Context>& context, double width) const;
  
  /** This function is only intended to be used when implementing new canvas
   * items, specifically layout items such as Goo::CanvasTable.
   * 
   * It allocates an area to a child Goo::CanvasItem.
   * 
   * Note that the parent layout item will use a transform to move each of its
   * children for the layout, so there is no need for the child item to
   * reposition itself. It only needs to recalculate its device bounds.
   * 
   * To help recalculate the item's device bounds, the @a x_offset and @a y_offset
   * of the child item's allocated position from its requested position are
   * provided. Simple items can just add these to their bounds.
   * 
   * @param context A cairo context.
   * @param requested_area The area that the item originally requested, in the
   * parent's coordinate space.
   * @param allocated_area The area that the item has been allocated, in the parent's
   * coordinate space.
   * @param x_offset The x offset of the allocated area from the requested area in
   * the device coordinate space.
   * @param y_offset The y offset of the allocated area from the requested area in
   * the device coordinate space.
   */
  void allocate_area(const Cairo::RefPtr<Cairo::Context>& context, const Bounds& requested_area, const Bounds& allocated_area, double x_offset, double y_offset);


  // Note the semantics of the C version: The returned list is the same as the
  // one fed into the function, with possibly some elements added to the head.
 

  /** This function is only intended to be used when implementing new canvas
   * items, specifically container items such as Goo::CanvasGroup.
   * 
   * It gets the items at the given point.
   * 
   * @param x The x coordinate of the point.
   * @param y The y coordinate of the point.
   * @param context A cairo contect.
   * @param is_pointer_event <tt>true</tt> if the "pointer-events" properties of items should
   * be used to determine which parts of the item are tested.
   * @param parent_is_visible <tt>true</tt> if the parent item is visible (which
   * implies that all ancestors are also visible).
   * @param found_items The list of items found so far.
   * @return The @a found_items list, with any more found items added onto
   * the start of the list, leaving the top item first.
   */
  std::vector< Glib::RefPtr<Item> > get_items_at(double x, double y, const Cairo::RefPtr<Cairo::Context>& context, bool is_pointer_event, bool parent_is_visible, const std::vector< Glib::RefPtr<Item> >& found_items);
  
  /** This function is only intended to be used when implementing new canvas
   * items, specifically container items such as Goo::CanvasGroup.
   * 
   * It gets the items at the given point.
   * 
   * @param x The x coordinate of the point.
   * @param y The y coordinate of the point.
   * @param context A cairo contect.
   * @param is_pointer_event <tt>true</tt> if the "pointer-events" properties of items should
   * be used to determine which parts of the item are tested.
   * @param parent_is_visible <tt>true</tt> if the parent item is visible (which
   * implies that all ancestors are also visible).
   * @param found_items The list of items found so far.
   * @return The @a found_items list, with any more found items added onto
   * the start of the list, leaving the top item first.
   */
  std::vector< Glib::RefPtr<const Item> > get_items_at(double x, double y, const Cairo::RefPtr<Cairo::Context>& context, bool is_pointer_event, bool parent_is_visible, const std::vector< Glib::RefPtr<const Item> >& found_items) const;

  // Use this if you don't have a list already:
  std::vector< Glib::RefPtr<Item> > get_items_at(double x, double y, const Cairo::RefPtr<Cairo::Context>& context, bool is_pointer_event, bool parent_is_visible);
  std::vector< Glib::RefPtr<const Item> > get_items_at(double x, double y, const Cairo::RefPtr<Cairo::Context>& context, bool is_pointer_event, bool parent_is_visible) const;

  //TODO: Use Cairo::RefPtr?
  
  /** Gets the transformation matrix of an item.
   * 
   * @param matrix The place to store the transform.
   * @return <tt>true</tt> if a transform is set.
   */
  bool get_transform(Cairo::Matrix* matrix);
  
  /** Sets the transformation matrix of an item.
   * 
   * @param matrix The new transformation matrix, or <tt>0</tt> to reset the
   * transformation to the identity matrix.
   */
  void set_transform(const Cairo::Matrix* matrix);

  
  /** A convenience function to set the item's transformation matrix.
   * 
   * @param x The x coordinate of the origin of the item's coordinate space.
   * @param y The y coordinate of the origin of the item's coordinate space.
   * @param scale The scale of the item.
   * @param rotation The clockwise rotation of the item, in degrees.
   */
  void set_simple_transform(double x, double y, double scale, double rotation);
  
  /** This function can be used to get the position, scale and rotation of an
   * item, providing that the item has a simple transformation matrix
   * (e.g.\ set with set_simple_transform(), or using a
   * combination of simple translate, scale and rotate operations). If the item
   * has a complex transformation matrix the results will be incorrect.
   * 
   * @param x Returns the x coordinate of the origin of the item's coordinate space.
   * @param y Returns the y coordinate of the origin of the item's coordinate space.
   * @param scale Returns the scale of the item.
   * @param rotation Returns the clockwise rotation of the item, in degrees (0-360).
   * @return <tt>true</tt> if a transform is set.
   */
  bool get_simple_transform(double& x, double& y, double& scale, double& rotation) const;
  
  /** Translates the origin of the item's coordinate system by the given amounts.
   * 
   * @param tx The amount to move the origin in the horizontal direction.
   * @param ty The amount to move the origin in the vertical direction.
   */
  void translate(double tx, double ty);
  
  /** Scales the item's coordinate system by the given amounts.
   * 
   * @param sx The amount to scale the horizontal axis.
   * @param sy The amount to scale the vertical axis.
   */
  void scale(double sx, double sy);
  
  /** Rotates the item's coordinate system by the given amount, about the given
   * origin.
   * 
   * @param degrees The clockwise angle of rotation.
   * @param cx The x coordinate of the origin of the rotation.
   * @param cy The y coordinate of the origin of the rotation.
   */
  void rotate(double degrees, double cx, double cy);
  
  /** Skews the item's coordinate system along the x axis by the given amount,
   * about the given origin.
   * 
   * @param degrees The skew angle.
   * @param cx The x coordinate of the origin of the skew transform.
   * @param cy The y coordinate of the origin of the skew transform.
   */
  void skew_x(double degrees, double cx, double cy);
  
  /** Skews the item's coordinate system along the y axis by the given amount,
   * about the given origin.
   * 
   * @param degrees The skew angle.
   * @param cx The x coordinate of the origin of the skew transform.
   * @param cy The y coordinate of the origin of the skew transform.
   */
  void skew_y(double degrees, double cx, double cy);

  
  /** Gets the transformation matrix of an item combined with any special
   * transform needed for the given child. These special transforms are used
   * by layout items such as Goo::CanvasTable.
   * 
   * @param child A child of @a item.
   * @param transform The place to store the transform.
   * @return <tt>true</tt> if a transform is set.
   */
  bool get_transform_for_child(const Glib::RefPtr<Item>& child, Cairo::Matrix* transform);

  
  /** Gets the item's style. If the item doesn't have its own style it will return
   * its parent's style.
   * 
   * @return The item's style.
   */
  Glib::RefPtr<Style> get_style();
  
  /** Gets the item's style. If the item doesn't have its own style it will return
   * its parent's style.
   * 
   * @return The item's style.
   */
  Glib::RefPtr<const Style> get_style() const;
  
  /** Sets the item's style, by copying the properties from the given style.
   * 
   * @param style A style.
   */
  void set_style(const Glib::RefPtr<Style>& style);

  
  /** Animates an item from its current position to the given offsets, scale
   * and rotation.
   * 
   * @param x The final x coordinate.
   * @param y The final y coordinate.
   * @param scale The final scale.
   * @param degrees The final rotation. This can be negative to rotate anticlockwise,
   * and can also be greater than 360 to rotate a number of times.
   * @param absolute If the @a x, @a y, @a scale and @a degrees values are absolute, or
   * relative to the current transform. Note that absolute animations only work
   * if the item currently has a simple transform. If the item has a shear or
   * some other complicated transform it may result in strange animations.
   * @param duration The duration of the animation, in milliseconds (1/1000ths of a
   * second).
   * @param step_time The time between each animation step, in milliseconds.
   * @param type Specifies what happens when the animation finishes.
   */
  void animate(double x, double y, double scale, double degrees, bool absolute, int duration, int step_time, GooCanvasAnimateType type);
  
  /** Stops any current animation for the given item, leaving it at its current
   * position.
   */
  void stop_animation();

  
  bool get_is_static() const;
  
  void set_is_static(bool is_static =  true);

  //_WRAP_SIGNAL(void child_added(int child_num), "child_added")
  //_WRAP_SIGNAL(void child_moved(int old_position, int new_position), "child_moved")
  //_WRAP_SIGNAL(void child_removed(int child_num), "child_removed")
  //_WRAP_SIGNAL(void changed(bool recompute_bounds), "changed")

 
  /**
   * @par Slot Prototype:
   * <tt>bool on_my_%enter_notify_event(const Glib::RefPtr<Item>& target, GdkEventCrossing* event)</tt>
   *
   */

  Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventCrossing* > signal_enter_notify_event();

  
  /**
   * @par Slot Prototype:
   * <tt>bool on_my_%leave_notify_event(const Glib::RefPtr<Item>& target, GdkEventCrossing* event)</tt>
   *
   */

  Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventCrossing* > signal_leave_notify_event();

  
  /**
   * @par Slot Prototype:
   * <tt>bool on_my_%motion_notify_event(const Glib::RefPtr<Item>& target, GdkEventMotion* event)</tt>
   *
   */

  Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventMotion* > signal_motion_notify_event();

  
  /**
   * @par Slot Prototype:
   * <tt>bool on_my_%button_press_event(const Glib::RefPtr<Item>& target, GdkEventButton* event)</tt>
   *
   */

  Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventButton* > signal_button_press_event();

  
  /**
   * @par Slot Prototype:
   * <tt>bool on_my_%button_release_event(const Glib::RefPtr<Item>& target, GdkEventButton* event)</tt>
   *
   */

  Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventButton* > signal_button_release_event();

  
  /**
   * @par Slot Prototype:
   * <tt>bool on_my_%focus_in_event(const Glib::RefPtr<Item>& target, GdkEventFocus* event)</tt>
   *
   */

  Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventFocus* > signal_focus_in_event();

  
  /**
   * @par Slot Prototype:
   * <tt>bool on_my_%focus_out_event(const Glib::RefPtr<Item>& target, GdkEventFocus* event)</tt>
   *
   */

  Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventFocus* > signal_focus_out_event();

  
  /**
   * @par Slot Prototype:
   * <tt>bool on_my_%key_press_event(const Glib::RefPtr<Item>& target, GdkEventKey* event)</tt>
   *
   */

  Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventKey* > signal_key_press_event();

  
  /**
   * @par Slot Prototype:
   * <tt>bool on_my_%key_release_event(const Glib::RefPtr<Item>& target, GdkEventKey* event)</tt>
   *
   */

  Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventKey* > signal_key_release_event();

  
  /**
   * @par Slot Prototype:
   * <tt>bool on_my_%grab_broken_event(const Glib::RefPtr<Item>& target, GdkEventGrabBroken* event)</tt>
   *
   */

  Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventGrabBroken* > signal_grab_broken_event();

  
  /**
   * @par Slot Prototype:
   * <tt>void on_my_%child_notify(GParamSpec* pspec)</tt>
   *
   */

  Glib::SignalProxy1< void,GParamSpec* > signal_child_notify();

  
  /**
   * @par Slot Prototype:
   * <tt>void on_my_%animation_finished(bool stopped)</tt>
   *
   */

  Glib::SignalProxy1< void,bool > signal_animation_finished();

  
  /**
   * @par Slot Prototype:
   * <tt>bool on_my_%scroll_event(const Glib::RefPtr<Item>& target, GdkEventScroll* event)</tt>
   *
   */

  Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventScroll* > signal_scroll_event();


  /** The parent item.
   *
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< Glib::RefPtr<Item> > property_parent() ;

/** The parent item.
   *
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Item> > property_parent() const;

  /** When the canvas item is visible.
   *
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< ItemVisibility > property_visibility() ;

/** When the canvas item is visible.
   *
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< ItemVisibility > property_visibility() const;

  /** The scale threshold at which the item becomes visible.
   *
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< double > property_visibility_threshold() ;

/** The scale threshold at which the item becomes visible.
   *
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< double > property_visibility_threshold() const;

  /** The transformation matrix of the item.
   *
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< Cairo::Matrix* > property_transform() ;

/** The transformation matrix of the item.
   *
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< Cairo::Matrix* > property_transform() const;

  /** Specifies when the item receives pointer events.
   *
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< PointerEvents > property_pointer_events() ;

/** Specifies when the item receives pointer events.
   *
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< PointerEvents > property_pointer_events() const;

  /** A short context-rich description of the item for use by assistive technologies.
   *
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< Glib::ustring > property_title() ;

/** A short context-rich description of the item for use by assistive technologies.
   *
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< Glib::ustring > property_title() const;

  /** A description of the item for use by assistive technologies.
   *
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< Glib::ustring > property_description() ;

/** A description of the item for use by assistive technologies.
   *
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< Glib::ustring > property_description() const;

  /** If the item can take the keyboard focus.
   *
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< bool > property_can_focus() ;

/** If the item can take the keyboard focus.
   *
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< bool > property_can_focus() const;


  //These properties are not really in GooCanvasItem, but they are actually 
  //implemented in all derived GooCanvasItem classes individually. 
  //That is a GooCanvas design error, but the patch to fix it has 
  //not yet been accepted: http://bugzilla.gnome.org/show_bug.cgi?id=555097 
  /** The x coordinate of the left side of the item.
   *
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< double > property_x() ;

/** The x coordinate of the left side of the item.
   *
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< double > property_x() const;

  /** The y coordinate of the top of the item.
   *
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< double > property_y() ;

/** The y coordinate of the top of the item.
   *
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< double > property_y() const;

  /** The width of the item.
   *
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< double > property_width() ;

/** The width of the item.
   *
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< double > property_width() const;

  /** The height of the item.
   *
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< double > property_height() ;

/** The height of the item.
   *
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< double > property_height() const;


protected:

 
/* Virtual methods that group items must implement. */
    virtual int get_n_children_vfunc() const;

    virtual Glib::RefPtr<Item> get_child_vfunc(int child_num) const;

    virtual void request_update_vfunc();

    virtual Canvas* get_canvas_vfunc() const;

    virtual void set_canvas_vfunc(Canvas* canvas);


  /* Virtual methods that group items may implement. */

    virtual void add_child_vfunc(const Glib::RefPtr<Item>& child, int position);

    virtual void move_child_vfunc(int old_position, int new_position);

    virtual void remove_child_vfunc(int child_num);

    virtual void get_child_property_vfunc(const Glib::RefPtr<Item>& child, guint property_id, Glib::ValueBase& value, GParamSpec* pspec) const;

    virtual void set_child_property_vfunc(const Glib::RefPtr<Item>& child, guint property_id, const Glib::ValueBase& value, GParamSpec* pspec);

    virtual bool get_transform_for_child_vfunc(const Glib::RefPtr<Item>& child, Cairo::Matrix* transform) const;


  /* Virtual methods that all canvas items must implement. */

    virtual Glib::RefPtr<Item> get_parent_vfunc() const;

    virtual void set_parent_vfunc(const Glib::RefPtr<Item>& parent);


#ifdef GLIBMM_VFUNCS_ENABLED
  // Hand code, since Bounds can only copy a GooCanvasBounds* but not ref one.
  virtual void get_bounds_vfunc(Bounds& bounds) const;
  virtual std::vector<Glib::RefPtr<Item> > get_items_at_vfunc(double x, double y, const Cairo::RefPtr<Cairo::Context>& context, bool is_pointer_event, bool is_parent_visible, const std::vector<Glib::RefPtr<Item> >& found_items);
#endif


    virtual void update_vfunc(bool entire_tree, const Cairo::RefPtr<Cairo::Context>& cr, Bounds& bounds);


    virtual void paint_vfunc(const Cairo::RefPtr<Cairo::Context>& cr, const Bounds& bounds, double scale);


    virtual bool get_requested_area_vfunc(const Cairo::RefPtr<Cairo::Context>& cr, GooCanvasBounds* requested_area) const;

    virtual void allocate_area_vfunc(const Cairo::RefPtr<Cairo::Context>& cr, const Bounds& requested_area, const Bounds& allocated_area, double x_offset, double y_offset);


  /* Virtual methods that canvas items may implement. */

    virtual bool get_transform_vfunc(Cairo::Matrix* transform) const;

    virtual void set_transform_vfunc(const Cairo::Matrix* transform);


    virtual Glib::RefPtr<Style> get_style_vfunc() const;

    virtual void set_style_vfunc(const Glib::RefPtr<Style>& style);

    virtual bool is_visible_vfunc() const;

    virtual double get_requested_height_vfunc(const Cairo::RefPtr<Cairo::Context>& cr, double width);

    virtual bool get_is_static_vfunc() const;

    virtual void set_is_static_vfunc(bool is_static);


  /* Virtual methods that model/view items must implement. */
 

    virtual Glib::RefPtr<ItemModel> get_model_vfunc() const;

    virtual void set_model_vfunc(const Glib::RefPtr<ItemModel>& model);


public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::
  /// This is a default handler for the signal signal_enter_notify_event().
  virtual bool on_enter_notify_event(const Glib::RefPtr<Item>& target, GdkEventCrossing* event);
  /// This is a default handler for the signal signal_leave_notify_event().
  virtual bool on_leave_notify_event(const Glib::RefPtr<Item>& target, GdkEventCrossing* event);
  /// This is a default handler for the signal signal_motion_notify_event().
  virtual bool on_motion_notify_event(const Glib::RefPtr<Item>& target, GdkEventMotion* event);
  /// This is a default handler for the signal signal_button_press_event().
  virtual bool on_button_press_event(const Glib::RefPtr<Item>& target, GdkEventButton* event);
  /// This is a default handler for the signal signal_button_release_event().
  virtual bool on_button_release_event(const Glib::RefPtr<Item>& target, GdkEventButton* event);
  /// This is a default handler for the signal signal_focus_in_event().
  virtual bool on_focus_in_event(const Glib::RefPtr<Item>& target, GdkEventFocus* event);
  /// This is a default handler for the signal signal_focus_out_event().
  virtual bool on_focus_out_event(const Glib::RefPtr<Item>& target, GdkEventFocus* event);
  /// This is a default handler for the signal signal_key_press_event().
  virtual bool on_key_press_event(const Glib::RefPtr<Item>& target, GdkEventKey* event);
  /// This is a default handler for the signal signal_key_release_event().
  virtual bool on_key_release_event(const Glib::RefPtr<Item>& target, GdkEventKey* event);
  /// This is a default handler for the signal signal_grab_broken_event().
  virtual bool on_grab_broken_event(const Glib::RefPtr<Item>& target, GdkEventGrabBroken* event);
  /// This is a default handler for the signal signal_child_notify().
  virtual void on_child_notify(GParamSpec* pspec);
  /// This is a default handler for the signal signal_animation_finished().
  virtual void on_animation_finished(bool stopped);
  /// This is a default handler for the signal signal_scroll_event().
  virtual bool on_scroll_event(const Glib::RefPtr<Item>& target, GdkEventScroll* event);


};

#ifndef DOXYGEN_SHOULD_SKIP_THIS

template <class PropertyType>
void Item::get_child_property(const Glib::RefPtr<Item>& child, const Glib::ustring& the_property_name, PropertyType& value) const
{
  Glib::Value<PropertyType> property_value;
  property_value.init(Glib::Value<PropertyType>::value_type());

  this->get_child_property_value(child, the_property_name, property_value);

  value = property_value.get();
}

template <class PropertyType>
void Item::set_child_property(const Glib::RefPtr<Item>& child, const Glib::ustring& the_property_name, const PropertyType& value)
{
  Glib::Value<PropertyType> property_value;
  property_value.init(Glib::Value<PropertyType>::value_type());
  property_value.set(value);

  this->set_child_property_value(child, the_property_name, property_value);
}


#endif /* DOXYGEN_SHOULD_SKIP_THIS */

} //namespace Goocanvas


namespace Glib
{
  /** A Glib::wrap() method for this object.
   * 
   * @param object The C instance.
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   *
   * @relates Goocanvas::Item
   */
  Glib::RefPtr<Goocanvas::Item> wrap(GooCanvasItem* object, bool take_copy = false);

} // namespace Glib


#endif /* _GOOCANVASMM_ITEM_H */