/* * This file is part of RawTherapee. * * Copyright (c) 2004-2010 Gabor Horvath * * RawTherapee is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * RawTherapee 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 RawTherapee. If not, see . */ #ifndef _CURSORMANAGER_ #define _CURSORMANAGER_ #include enum CursorShape { CSUndefined, CSArrow, CSOpenHand, CSClosedHand, CSMove, CSMoveLeft, CSMoveRight, CSResizeWidth, CSResizeHeight, CSResizeDiagonal, CSResizeTopLeft, CSResizeTopRight, CSResizeBottomLeft, CSResizeBottomRight, CSMove2D, CSMove1DH, CSMove1DV, CSMoveRotate, CSSpotWB, CSCropSelect, CSStraighten, CSPlus, CSWait, CSEmpty }; class CursorManager { private: Glib::RefPtr cResizeWidth; Glib::RefPtr cResizeHeight; Glib::RefPtr cResizeDiag; Glib::RefPtr cResizeTopLeft; Glib::RefPtr cResizeTopRight; Glib::RefPtr cResizeBottomLeft; Glib::RefPtr cResizeBottomRight; Glib::RefPtr cCropMove; Glib::RefPtr cCropMoving; Glib::RefPtr cLeftTanMove; Glib::RefPtr cRightTanMove; Glib::RefPtr cNormal; Glib::RefPtr cCropSelection; Glib::RefPtr cAdd; Glib::RefPtr cWait; Glib::RefPtr cHand; Glib::RefPtr cClosedHand; Glib::RefPtr cWB; Glib::RefPtr cHidden; Glib::RefPtr cMove2D; Glib::RefPtr cMove1DH; Glib::RefPtr cMove1DV; Glib::RefPtr cMoveRotate; Glib::RefPtr display; Glib::RefPtr window; void setCursor (CursorShape shape); void setCursor (Glib::RefPtr window, CursorShape shape); public: void init (Glib::RefPtr mainWindow); static void setWidgetCursor (Glib::RefPtr window, CursorShape shape); static void setCursorOfMainWindow (Glib::RefPtr window, CursorShape shape); }; extern CursorManager mainWindowCursorManager; extern CursorManager editWindowCursorManager; #endif