// ======================================================================================== // TFWCursors.cpp Copyright (C) 2001-2002 Mike Lockwood. All rights reserved. // ======================================================================================== /* This program 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 2 of the License, or (at your option) any later version. This program 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 this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "FWCommon.h" #include "TCursor.h" #include "TGeometry.h" static char kHorizCursorData[] = { 0x00, 0x00, 0x80, 0x00, 0xC0, 0x01, 0xE0, 0x03, 0x80, 0x00, 0x80, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x80, 0x00, 0x80, 0x00, 0xE0, 0x03, 0xC0, 0x01, 0x80, 0x00, 0x00, 0x00 }; static char kHorizCursorMask[] = { 0x80, 0x00, 0xC0, 0x01, 0xE0, 0x03, 0xF0, 0x07, 0xE0, 0x03, 0xFF, 0x7F, 0xFF, 0x7F, 0xFF, 0x7F, 0xFF, 0x7F, 0xFF, 0x7F, 0xFF, 0x7F, 0xE0, 0x03, 0xF0, 0x07, 0xE0, 0x03, 0xC0, 0x01, 0x80, 0x00 }; static char kVertCursorData[] = { 0x00, 0x00, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x48, 0x12, 0x4C, 0x32, 0x7E, 0x7E, 0x4C, 0x32, 0x48, 0x12, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00 }; static char kVertCursorMask[] = { 0xE0, 0x07, 0xE0, 0x07, 0xE0, 0x07, 0xE0, 0x07, 0xE8, 0x17, 0xFC, 0x3F, 0xFE, 0x7F, 0xFF, 0xFF, 0xFE, 0x7F, 0xFC, 0x3F, 0xE8, 0x17, 0xE0, 0x07, 0xE0, 0x07, 0xE0, 0x07, 0xE0, 0x07, 0x00, 0x00 }; static char kInvisibleCursorData[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static char kInvisibleCursorMask[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static TCursor* sHorizCursor = NULL; static TCursor* sVertCursor = NULL; static TCursor* sInvisibleCursor = NULL; TCursor* GetHorizSplitterCursor() { if (! sHorizCursor) sHorizCursor = new TCursor(kHorizCursorData, kHorizCursorMask, TPoint(7, 7)); return sHorizCursor; } TCursor* GetVertSplitterCursor() { if (! sVertCursor) sVertCursor = new TCursor(kVertCursorData, kVertCursorMask, TPoint(7, 7)); return sVertCursor; } TCursor* GetInvisibleCursor() { if (! sInvisibleCursor) sInvisibleCursor = new TCursor(kInvisibleCursorData, kInvisibleCursorMask, TPoint(1, 1)); return sInvisibleCursor; }