James Muir > Gtk2-Ex-MindMapView-0.000001 > Gtk2::Ex::MindMapView::HotSpot

Download:
Gtk2-Ex-MindMapView-0.000001.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.000001   Source  

NAME ^

Gtk2::Ex::MindMapView::HotSpot - Base class for grips and toggles.

VERSION ^

This document describes Gtk2::Ex::MindMapView::HotSpot version 0.0.1

SYNOPSIS ^

use base 'Gtk2::Ex::MindMapView::HotSpot';

DESCRIPTION ^

This module is internal to Gtk2::Ex::MindMapView. Four Gtk2::Ex::MindMapView::HotSpots are created for each Gtk2::Ex::MindMapView::Item. The hotspots are areas on a mind map item that when clicked, cause an action to be performed on an item. These hotspots allow the user to expand/collapse the items in the mind map, or to resize an item.

INTERFACE ^

Properties

Use the set method to set these properties. Accessing them directly will only cause you trouble.

'item' (Gtk2::Ex::MindMapView::Item)

Items and hotspots are rather fond of each other. This item is the one this hotspot is attached to.

'enabled' (boolean)

If enabled, this hotspot is ready for action. The type of action depends on whether it is a grip or a toggle. Grips are used to resize an item. Toggles are used to expand or collapse paths on the mind map graph.

'fill_color_gdk' (Gtk2::Gdk::Color)

The color with which to fill in the hotspot.

'outline_color_gdk' (Gtk2::Gdk::Color)

The color with which to fill in the hotspot outline. Toggles normally have a visible outline, while grips usually have the outline set to the same color as the item fill color.

'hotspot_color_gdk' (Gtk2::Gdk::Color)

The color of the hotspot once it is engaged. A hotspot becomes engaged when the mouse is placed close to it.

Methods

new (item=>$item)

Instantiates a hotspot that is associated with the Gtk2::Ex::MindMapView::Item.

This module connects to the Gnome2::Canvas::Item "event" event, and depending on the event type will call back to it's Gtk2::Ex::MindMapView::Item.

hotspot_adjust_event_handler

This method must be overridden. It handles the "hotspot_adjust" event.

hotspot_button_press

This method may optionally be overridden to handle the "button-press" event.

hotspot_button_release

This method may optionally be overridden to handle the "button-release" event.

hotspot_engaged

This method may optionally be overridden to set the "engaged" flag in a non-standard way.

hotspot_enter_notify

This method may optionally be overridden to handle the "enter-notify" event.

hotspot_get_image()

This method must be overridden. It is used to instantiate a hotspot toggle or grip.

hotspot_leave_notify

This method may optionally be overridden to handle the "leave-notify" event.

hotspot_motion_notify

This method may optionally be overridden to handle the "motion-notify" event.

DIAGNOSTICS ^

set(fill_color_gdk=>...) expecting a Gtk2::Gdk::Color

You did not pass in a Gtk2::Gdk::Color for the color argument. Here's an example of how to get a Gtk2::Gdk::Color:

     my $red_color = Gtk2::Gdk::Color->parse("red");
set(outline_color_gdk=>...) expecting a Gtk2::Gdk::Color

You did not pass in a Gtk2::Gdk::Color for the color argument. Here's an example of how to get a Gtk2::Gdk::Color:

     my $red_color = Gtk2::Gdk::Color->parse("red");
set(hotspot_color_gdk=>...) expecting a Gtk2::Gdk::Color

You did not pass in a Gtk2::Gdk::Color for the color argument. Here's an example of how to get a Gtk2::Gdk::Color:

     my $red_color = Gtk2::Gdk::Color->parse("red");
Unexpected side: $self-{side}. Valid are: 'right' and 'left'>

You have to specify whether this hotspot is on the left or right side of the item it is attached to. Choose either 'left' or 'right'.

Item argument is not a Gtk2::Ex::MindMapView::Item.

Hotspots want to attach themselves to a Gtk2::Ex::MindMapView::Item. Don't bother trying to hook them up to something else. They just won't like it and will complain about it.

You must supply a handler for the 'hotspot_adjust' event.

Every hotspot must be subclassed, and the "hotspot_adjust" event handler method should be overridden. See Gtk2::Ex::MindMapView::HotSpot::Grip.pm or Gtk2::Ex::MindMapView::HotSpot::Toggle.pm for an example of how to do this.

No hotspot image given. Every hotspot must have a Gnome2::Canvas::Item for an image.

Every hotspot should have a visible image associated with it. You must override the hotspot_get_image method to supply the image.

DEPENDENCIES ^

None.

BUGS AND LIMITATIONS ^

No bugs have been reported.

Please report any bugs or feature requests to bug-gtk2-ex-mindmapview@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR ^

James Muir <hemlock@vtlink.net>

LICENCE AND COPYRIGHT ^

Copyright (c) 2006, James Muir <hemlock@vtlink.net>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

DISCLAIMER OF WARRANTY ^

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

syntax highlighting: