Enhanced edit mechanism, with "element picking" possibility
This commit is contained in:
207
rtgui/edit.h
207
rtgui/edit.h
@@ -63,10 +63,10 @@ class EditSubscriber;
|
||||
* ### Event handling
|
||||
*
|
||||
* The mouseOver method is called on each mouse movement, excepted when dragging a point. This method can then access
|
||||
* the pipetteVal array values, which contain the mean of the pixel read in the buffer, or -1 of the cursor is outside
|
||||
* the pipetteVal array values, which contain the mean of the pixel read in the buffer, or -1 if the cursor is outside
|
||||
* of the image. In this case, EditDataProvider::object is also set to 0 (and 1 if over the image).
|
||||
*
|
||||
* When the user will click on the left mouse button while pressing the CTRL key, the button1Pressed will be called.
|
||||
* When the user will click on the left mouse button while pressing the CTRL key, button1Pressed will be called.
|
||||
* Setting "dragging" to true (or false) is not required for the pipette type editing.
|
||||
*
|
||||
* The drag1 method will be called on all subsequent mouse move. The pipetteVal[3] array will already be filled with
|
||||
@@ -79,7 +79,7 @@ class EditSubscriber;
|
||||
*
|
||||
* By using this class, objects can be drawn and manipulated on the preview.
|
||||
*
|
||||
* The developer has to handle the buttonPress, buttonRelease, drag and mouseOver method that he needs. There
|
||||
* The developer has to handle the buttonPress, buttonRelease, drag and mouseOver methods that he needs. There
|
||||
* are buttonPress, buttonRelease and drag methods dedicated to each mouse button, for better flexibility
|
||||
* (e.g.button2Press, button2Release, drag2 will handle event when mouse button 2 is used first). RT actually
|
||||
* does not handle multiple mouse button event (e.g. button1 + button2), only one at a time. The first button pressed
|
||||
@@ -93,10 +93,11 @@ class EditSubscriber;
|
||||
* specific values. To be displayed, the F_VISIBLE flag has to be set through the setActive or setVisible methods.
|
||||
*
|
||||
* The second list (mouseOverGeometry) is used in a backbuffer, the color used to draw the shape being the id of the
|
||||
* mouseOverGeometry. As an example, you could use a circle line to represent the line to the user, but use another
|
||||
* Circle object, filled, to be used as mouseOver detection. The association between both shape (visible and mouseOver)
|
||||
* mouseOverGeometry. As an example, you could create a line to be shown in the preview, but create 2 filled Circle object
|
||||
* to be used as mouseOver detection, one on each end of the line. The association between both shape (visible and mouseOver)
|
||||
* is handled by the developer. To be displayed on this backbuffer, the F_HOVERABLE flag has to be set through the
|
||||
* setActive or setHoverable methods.
|
||||
* setActive or setHoverable methods. For overlapping mouse over geometry, the priority is set by the order in the list :
|
||||
* the last item is detected first (think of it like a stack piled up).
|
||||
*
|
||||
*
|
||||
* ### Event handling
|
||||
@@ -106,17 +107,28 @@ class EditSubscriber;
|
||||
*
|
||||
* RT will call the mouseOver method on each mouse movement where no mouse button is pressed.
|
||||
*
|
||||
* On mouse button press over a mouseOverGeometry, it will call the button press method corresponding to the button
|
||||
* (e.g. button1Pressed for mouse button 1), with the modifier key as parameter. Any other mouse button pressed at
|
||||
* the same time will be ignored. It's up to the developer to decide whether it leads to a drag movement or not,
|
||||
* by setting the "dragging" boolean to true.
|
||||
* On mouse button press over a mouseOverGeometry (that has F_HOVERABLE set), it will call the button press method corresponding
|
||||
* to the button (e.g. button1Pressed for mouse button 1), with the modifier key as parameter. Any other mouse button pressed at
|
||||
* the same time will be ignored. It's up to the developer to decide whether this action is starting a 'drag' or 'pick' action,
|
||||
* by setting the 'action' parameter to the appropriated value.
|
||||
*
|
||||
* In this case, RT will then sent drag1 event (to stay with our button 1 pressed example) on each mouse movement. It's up
|
||||
* to the developer of the tool to handle the dragging. The EditProvider class will help you in this by handling the actual
|
||||
* position in various coordinate system and ways.
|
||||
* If the user sets action to ES_ACTION_DRAGGING, RT will then send drag1 events (to stay with our button 1 pressed example) on each
|
||||
* mouse movement. It's up to the developer of the tool to handle the dragging. The EditProvider class will help you in this by
|
||||
* handling the actual position in various coordinate system and ways.
|
||||
*
|
||||
* When the user will release the mouse button, RT will call the button1Release event (in our example). The developer have
|
||||
* then to set the "dragging" flag to false.
|
||||
* then to set action to ES_ACTION_NONE.
|
||||
*
|
||||
* If the user sets action to ES_ACTION_PICKING, RT will keep in memory the mouseOver object that was selected when pressing the mouse
|
||||
* (e.g. button 1), as well as the modifier keys.
|
||||
*
|
||||
* The element is said to be picked when the mouse button is released over the same mouse over object and with the same active
|
||||
* modifier keys. In this case, the corresponding picked event (e.g. picked1 in our example) and the 'picked' flag will be true.
|
||||
* If any of those condition is false, picked1 will still be be called to terminate the initiated picking action, but 'picked'
|
||||
* will be false. This is necessary because the user may want to update the geometry if the picking is aborted. The developer have
|
||||
* then to set action to ES_ACTION_NONE.
|
||||
*
|
||||
* Picking an on-screen element correspond to single-clicking on it. No double click is supported so far.
|
||||
*
|
||||
* Each of these methods have to returns a boolean value saying that the preview has to be refreshed or not (i.e. the displayed
|
||||
* geometry).
|
||||
@@ -134,11 +146,9 @@ class EditSubscriber;
|
||||
* the HSV tool, the Hue and Saturation and Value curves are applied on the current state of the image. That's why the pipette
|
||||
* of the H, S and V curve will share the same data of this "current state", otherwise the read value would be wrong.
|
||||
*
|
||||
* When the mouse button 1 is pressed while pressing the CTRL key, the button1Pressed method will be called.
|
||||
*
|
||||
* When the Edit process stops, the Subscriber is removed from the DataProvider, so buffers can be freed up.
|
||||
* A new ToolPanelListener::panelChanged event is also thrown to update the preview again, without the tool's
|
||||
* graphical objects. The Edit button is also toggled off (by the user or programmatically).
|
||||
* graphical objects. The Edit button is also toggled off (by the user or programatically).
|
||||
*
|
||||
* It means that each Edit buttons toggled on will start an update of the preview which might or might not create
|
||||
* a new History entry, depending on the ProcEvent used.
|
||||
@@ -315,12 +325,13 @@ public:
|
||||
bool isHoverable ();
|
||||
void setHoverable (bool visible);
|
||||
|
||||
|
||||
// setActive will enable/disable the visible and hoverable flags in one shot!
|
||||
void setActive (bool active);
|
||||
|
||||
virtual void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *parent, EditCoordSystem &coordSystem) = 0;
|
||||
virtual void drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *parent, EditCoordSystem &coordSystem) = 0;
|
||||
virtual void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem) = 0;
|
||||
virtual void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) = 0;
|
||||
virtual void drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) = 0;
|
||||
virtual void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) = 0;
|
||||
};
|
||||
|
||||
class Circle : public Geometry
|
||||
@@ -335,9 +346,9 @@ public:
|
||||
Circle (rtengine::Coord& center, int radius, bool filled = false, bool radiusInImageSpace = false);
|
||||
Circle (int centerX, int centerY, int radius, bool filled = false, bool radiusInImageSpace = false);
|
||||
|
||||
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem);
|
||||
void drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem);
|
||||
void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem);
|
||||
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
void drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
};
|
||||
|
||||
class Line : public Geometry
|
||||
@@ -350,9 +361,9 @@ public:
|
||||
Line (rtengine::Coord& begin, rtengine::Coord& end);
|
||||
Line (int beginX, int beginY, int endX, int endY);
|
||||
|
||||
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem);
|
||||
void drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem);
|
||||
void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem);
|
||||
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
void drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
};
|
||||
|
||||
class Polyline : public Geometry
|
||||
@@ -363,9 +374,9 @@ public:
|
||||
|
||||
Polyline ();
|
||||
|
||||
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem);
|
||||
void drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem);
|
||||
void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem);
|
||||
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
void drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
};
|
||||
|
||||
class Rectangle : public Geometry
|
||||
@@ -381,9 +392,49 @@ public:
|
||||
void setXYXY(int left, int top, int right, int bottom);
|
||||
void setXYWH(rtengine::Coord topLeft, rtengine::Coord widthHeight);
|
||||
void setXYXY(rtengine::Coord topLeft, rtengine::Coord bottomRight);
|
||||
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem);
|
||||
void drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem);
|
||||
void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *pipetteBuffer, EditCoordSystem &coordSystem);
|
||||
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
void drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
};
|
||||
|
||||
class OPIcon : public Geometry // OP stands for "On Preview"
|
||||
{
|
||||
|
||||
protected:
|
||||
Cairo::RefPtr<Cairo::ImageSurface> normalImg;
|
||||
Cairo::RefPtr<Cairo::ImageSurface> prelightImg;
|
||||
Cairo::RefPtr<Cairo::ImageSurface> activeImg;
|
||||
Cairo::RefPtr<Cairo::ImageSurface> draggedImg;
|
||||
Cairo::RefPtr<Cairo::ImageSurface> insensitiveImg;
|
||||
|
||||
static void setPaths(Options &opt);
|
||||
static void updateImages();
|
||||
void changeImage(Glib::ustring &newImage);
|
||||
static Glib::ustring findIconAbsolutePath(const Glib::ustring &iconFName);
|
||||
void drawImage (Cairo::RefPtr<Cairo::ImageSurface> img, Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
void drawMOImage (Cairo::RefPtr<Cairo::ImageSurface> img, Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
void drivenPointToRectangle(rtengine::Coord &pos, rtengine::Coord &topLeft, rtengine::Coord &bottomRight, int W, int H);
|
||||
|
||||
public:
|
||||
enum DrivenPoint drivenPoint;
|
||||
rtengine::Coord position;
|
||||
|
||||
OPIcon (Cairo::RefPtr<Cairo::ImageSurface> *normal, Cairo::RefPtr<Cairo::ImageSurface> *active, Cairo::RefPtr<Cairo::ImageSurface> *prelight = NULL, Cairo::RefPtr<Cairo::ImageSurface> *dragged = NULL, Cairo::RefPtr<Cairo::ImageSurface> *insensitive = NULL,
|
||||
enum DrivenPoint drivenPoint = DP_CENTERCENTER);
|
||||
OPIcon (Glib::ustring normalImage, Glib::ustring activeImage, Glib::ustring prelightImage = "", Glib::ustring draggedImage = "", Glib::ustring insensitiveImage = "", enum DrivenPoint drivenPoint = DP_CENTERCENTER);
|
||||
Cairo::RefPtr<Cairo::ImageSurface> getNormalImg();
|
||||
Cairo::RefPtr<Cairo::ImageSurface> getPrelightImg();
|
||||
Cairo::RefPtr<Cairo::ImageSurface> getActiveImg();
|
||||
Cairo::RefPtr<Cairo::ImageSurface> getDraggedImg();
|
||||
Cairo::RefPtr<Cairo::ImageSurface> getInsensitiveImg();
|
||||
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
void drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem);
|
||||
};
|
||||
|
||||
class OPAdjuster : public Geometry // OP stands for "On Preview"
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
/// @brief Method for client tools needing Edit information
|
||||
@@ -401,7 +452,11 @@ private:
|
||||
protected:
|
||||
std::vector<Geometry*> visibleGeometry; /// displayed geometry
|
||||
std::vector<Geometry*> mouseOverGeometry; /// mouseOver geometry, drawn in a hidden buffer
|
||||
bool dragging; /// in object mode, set this to true in buttonPressed events to start dragging and ask for drag event (ignored in pipette mode)
|
||||
enum {
|
||||
ES_ACTION_NONE, ///
|
||||
ES_ACTION_DRAGGING, /// set action to this value in the buttonPressed event to start dragging and ask for drag event
|
||||
ES_ACTION_PICKING /// set action to this value in the buttonPressed event whenever the user is picking something through a single click. In this case, the pickX events will be called INSTEAD of buttonXReleased !
|
||||
} action; /// object mode only, ignored in Pipette mode
|
||||
|
||||
public:
|
||||
EditSubscriber (EditType editType);
|
||||
@@ -409,31 +464,32 @@ public:
|
||||
|
||||
void setEditProvider(EditDataProvider *provider);
|
||||
EditDataProvider* getEditProvider ();
|
||||
void setEditID(EditUniqueID ID, BufferType buffType);
|
||||
bool isCurrentSubscriber();
|
||||
virtual void subscribe();
|
||||
virtual void unsubscribe();
|
||||
virtual void switchOffEditMode (); /// Occurs when the user want to stop the editing mode
|
||||
EditUniqueID getEditID();
|
||||
EditType getEditingType();
|
||||
BufferType getPipetteBufferType();
|
||||
bool isDragging(); /// Returns true if something is being dragged and drag events has to be sent (object mode only)
|
||||
void setEditID(EditUniqueID ID, BufferType buffType);
|
||||
bool isCurrentSubscriber();
|
||||
virtual void subscribe();
|
||||
virtual void unsubscribe();
|
||||
virtual void switchOffEditMode (); /// Occurs when the user want to stop the editing mode
|
||||
const EditUniqueID getEditID();
|
||||
const EditType getEditingType();
|
||||
const BufferType getPipetteBufferType();
|
||||
const bool isDragging(); /// Returns true if something is being dragged and drag events has to be sent (object mode only)
|
||||
const bool isPicking(); /// Returns true if something is being picked
|
||||
|
||||
/** @brief Get the cursor to be displayed when above handles
|
||||
@param objectID object currently "hovered" */
|
||||
virtual CursorShape getCursor (int objectID);
|
||||
virtual CursorShape getCursor (const int objectID);
|
||||
|
||||
/** @brief Triggered when the mouse is moving over an object
|
||||
This method is also triggered when the cursor is moving over the image in ET_PIPETTE mode
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool mouseOver (int modifierKey);
|
||||
virtual bool mouseOver (const int modifierKey);
|
||||
|
||||
/** @brief Triggered when mouse button 1 is pressed, together with the CTRL modifier key if the subscriber is of type ET_PIPETTE
|
||||
Once the key is pressed, RT will enter in drag1 mode on subsequent mouse movements
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool button1Pressed (int modifierKey);
|
||||
virtual bool button1Pressed (const int modifierKey);
|
||||
|
||||
/** @brief Triggered when mouse button 1 is released
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
@@ -443,7 +499,7 @@ public:
|
||||
Once the key is pressed, RT will enter in drag2 mode on subsequent mouse movements
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool button2Pressed (int modifierKey);
|
||||
virtual bool button2Pressed (const int modifierKey);
|
||||
|
||||
/** @brief Triggered when mouse button 2 is released (middle button)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
@@ -453,7 +509,7 @@ public:
|
||||
Once the key is pressed, RT will enter in drag3 mode on subsequent mouse movements
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool button3Pressed (int modifierKey);
|
||||
virtual bool button3Pressed (const int modifierKey);
|
||||
|
||||
/** @brief Triggered when mouse button 3 is released (right button)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
@@ -462,17 +518,36 @@ public:
|
||||
/** @brief Triggered when the user is moving while holding down mouse button 1
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool drag1 (int modifierKey);
|
||||
virtual bool drag1 (const int modifierKey);
|
||||
|
||||
/** @brief Triggered when the user is moving while holding down mouse button 2
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool drag2 (int modifierKey);
|
||||
virtual bool drag2 (const int modifierKey);
|
||||
|
||||
/** @brief Triggered when the user is moving while holding down mouse button 3
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool drag3 (int modifierKey);
|
||||
virtual bool drag3 (const int modifierKey);
|
||||
|
||||
/** @brief Triggered when the user is releasing mouse button 1 while in action==ES_ACTION_PICKING mode
|
||||
No modifier key is provided, since having a different modifier key than on button press will set picked to false.
|
||||
@param picked True if the cursor is still above the the same object than on button pressed and with the same modifier keys.
|
||||
If false, the user moved the cursor away or the modifier key is different, so the element is considered as NOT selected.
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool pick1 (const bool picked);
|
||||
|
||||
/** @brief Triggered when the user is releasing mouse button 2 while in action==ES_ACTION_PICKING mode
|
||||
@param picked True if the cursor is still above the the same object than on button pressed and with the same modifier keys.
|
||||
If false, the user moved the cursor away or the modifier key is different, so the element is considered as NOT selected.
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool pick2 (const bool picked);
|
||||
|
||||
/** @brief Triggered when the user is releasing mouse button 3 while in action==ES_ACTION_PICKING mode
|
||||
@param picked True if the cursor is still above the the same object than on button pressed and with the same modifier keys.
|
||||
If false, the user moved the cursor away or the modifier key is different, so the element is considered as NOT selected.
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool pick3 (const bool picked);
|
||||
|
||||
/** @brief Get the geometry to be shown to the user */
|
||||
const std::vector<Geometry*>& getVisibleGeometry ();
|
||||
@@ -617,8 +692,8 @@ inline bool Geometry::isHoverable () {
|
||||
return flags & F_HOVERABLE;
|
||||
}
|
||||
|
||||
inline void Geometry::setHoverable (bool visible) {
|
||||
if (visible) {
|
||||
inline void Geometry::setHoverable (bool hoverable) {
|
||||
if (hoverable) {
|
||||
flags |= F_HOVERABLE;
|
||||
} else {
|
||||
flags &= ~F_HOVERABLE;
|
||||
@@ -637,15 +712,15 @@ inline EditDataProvider* EditSubscriber::getEditProvider () {
|
||||
return provider;
|
||||
}
|
||||
|
||||
inline CursorShape EditSubscriber::getCursor (int objectID) {
|
||||
inline CursorShape EditSubscriber::getCursor (const int objectID) {
|
||||
return CSOpenHand;
|
||||
}
|
||||
|
||||
inline bool EditSubscriber::mouseOver (int modifierKey) {
|
||||
inline bool EditSubscriber::mouseOver (const int modifierKey) {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool EditSubscriber::button1Pressed (int modifierKey) {
|
||||
inline bool EditSubscriber::button1Pressed (const int modifierKey) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -653,7 +728,7 @@ inline bool EditSubscriber::button1Released () {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool EditSubscriber::button2Pressed (int modifierKey) {
|
||||
inline bool EditSubscriber::button2Pressed (const int modifierKey) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -661,7 +736,7 @@ inline bool EditSubscriber::button2Released () {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool EditSubscriber::button3Pressed (int modifierKey) {
|
||||
inline bool EditSubscriber::button3Pressed (const int modifierKey) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -669,15 +744,27 @@ inline bool EditSubscriber::button3Released () {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool EditSubscriber::drag1 (int modifierKey) {
|
||||
inline bool EditSubscriber::drag1 (const int modifierKey) {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool EditSubscriber::drag2 (int modifierKey) {
|
||||
inline bool EditSubscriber::drag2 (const int modifierKey) {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool EditSubscriber::drag3 (int modifierKey) {
|
||||
inline bool EditSubscriber::drag3 (const int modifierKey) {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool EditSubscriber::pick1 (const bool picked) {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool EditSubscriber::pick2 (const bool picked) {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool EditSubscriber::pick3 (const bool picked) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user