Mac: Added missing Cursor Shapes for Mac version

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1829 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2001-12-09 23:45:22 +00:00
parent 100f78de3f
commit 633555bb42
2 changed files with 83 additions and 16 deletions

View File

@ -1,5 +1,6 @@
CHANGES IN FLTK 1.1.0b7
- Mac Cursor Shapes added
- More documentation updates...
- Fl_Text_Display would lockup when all text was
deleted; for example, when running the editor

View File

@ -1,5 +1,5 @@
//
// "$Id: fl_cursor.cxx,v 1.6.2.6.2.1 2001/11/27 17:44:08 easysw Exp $"
// "$Id: fl_cursor.cxx,v 1.6.2.6.2.2 2001/12/09 23:45:22 matthiaswm Exp $"
//
// Mouse cursor support for the Fast Light Tool Kit (FLTK).
//
@ -97,37 +97,103 @@ void Fl_Window::cursor(Fl_Cursor c, Fl_Color, Fl_Color) {
#elif defined(__APPLE__)
static Cursor crsrNS =
static Cursor crsrHAND =
{
{ 0x0000, 0x0180, 0x03c0, 0x07e0, 0x0180, 0x0180, 0x0180, 0x0180,
0x0180, 0x0180, 0x0180, 0x0180, 0x07e0, 0x03c0, 0x0180, 0x0000 },
{ 0x0180, 0x03c0, 0x07e0, 0x0ff0, 0x0ff0, 0x03c0, 0x03c0, 0x03c0,
0x03c0, 0x03c0, 0x03c0, 0x0ff0, 0x0ff0, 0x07e0, 0x03c0, 0x0180 },
{ 0x0600, 0x0900, 0x0900, 0x0900, 0x09C0, 0x0938, 0x6926, 0x9805,
0x8801, 0x4801, 0x2002, 0x2002, 0x1004, 0x0804, 0x0408, 0x0408 },
{ 0x0600, 0x0F00, 0x0F00, 0x0F00, 0x0FC0, 0x0FF8, 0x6FFE, 0xFFFF,
0xFFFF, 0x7FFF, 0x3FFE, 0x3FFE, 0x1FFC, 0x0FFC, 0x07F8, 0x07F8 },
{ 5, 1 }
}, *crsrHANDptr = &crsrHAND;
static Cursor crsrHELP =
{
{ 0x0000, 0x4000, 0x6000, 0x7000, 0x783C, 0x7C7E, 0x7E66, 0x7F06,
0x7F8C, 0x7C18, 0x6C18, 0x4600, 0x0618, 0x0318, 0x0300, 0x0000 },
{ 0xC000, 0xE000, 0xF000, 0xF83C, 0xFC7E, 0xFEFF, 0xFFFF, 0xFFFF,
0xFFFE, 0xFFFC, 0xFE3C, 0xEF3C, 0xCF3C, 0x07BC, 0x0798, 0x0380 },
{ 1, 1 }
}, *crsrHELPptr = &crsrHELP;
static Cursor crsrMOVE =
{
{ 0x0000, 0x0180, 0x03C0, 0x07E0, 0x07E0, 0x1998, 0x399C, 0x7FFE,
0x7FFE, 0x399C, 0x1998, 0x07E0, 0x07E0, 0x03C0, 0x0180, 0x0000 },
{ 0x0180, 0x03C0, 0x07E0, 0x0FF0, 0x1FF8, 0x3FFC, 0x7FFE, 0xFFFF,
0xFFFF, 0x7FFE, 0x3FFC, 0x1FF8, 0x0FF0, 0x07E0, 0x03C0, 0x0180 },
{ 8, 8 }
}, *crsrMOVEptr = &crsrMOVE;
static Cursor crsrNS =
{
{ 0x0000, 0x0180, 0x03C0, 0x07E0, 0x0FF0, 0x0180, 0x0180, 0x0180,
0x0180, 0x0180, 0x0180, 0x0FF0, 0x07E0, 0x03C0, 0x0180, 0x0000 },
{ 0x0180, 0x03C0, 0x07E0, 0x0FF0, 0x1FF8, 0x1FF8, 0x03C0, 0x03C0,
0x03C0, 0x03C0, 0x1FF8, 0x1FF8, 0x0FF0, 0x07E0, 0x03C0, 0x0180 },
{ 8, 8 }
}, *crsrNSptr = &crsrNS;
static Cursor crsrWE =
{
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0810, 0x1818, 0x381C, 0x7FFE,
0x7FFE, 0x381C, 0x1818, 0x0810, 0x0000, 0x0000, 0x0000, 0x0000 },
{ 0x0000, 0x0000, 0x0000, 0x0C30, 0x1C38, 0x3C3C, 0x7FFE, 0xFFFF,
0xFFFF, 0x7FFE, 0x3C3C, 0x1C38, 0x0C30, 0x0000, 0x0000, 0x0000 },
{ 8, 8 }
}, *crsrWEptr = &crsrWE;
static Cursor crsrNWSE =
{
{ 0x0000, 0x7E00, 0x7C00, 0x7800, 0x7C00, 0x6E00, 0x4710, 0x03B0,
0x01F0, 0x00F0, 0x01F0, 0x03F0, 0x0000, 0x0000, 0x0000, 0x0000 },
{ 0xFF00, 0xFF00, 0xFE00, 0xFC00, 0xFE00, 0xFF18, 0xEFB8, 0xC7F8,
0x03F8, 0x01F8, 0x03F8, 0x07F8, 0x07F8, 0x0000, 0x0000, 0x0000 },
{ 8, 8 }
}, *crsrNWSEptr = &crsrNWSE;
static Cursor crsrNESW =
{
{ 0x0000, 0x03F0, 0x01F0, 0x00F0, 0x01F0, 0x03B0, 0x4710, 0x6E00,
0x7C00, 0x7800, 0x7C00, 0x7E00, 0x0000, 0x0000, 0x0000, 0x0000 },
{ 0x07F8, 0x07F8, 0x03F8, 0x01F8, 0x03F8, 0xC7F8, 0xEFB8, 0xFF18,
0xFE00, 0xFC00, 0xFE00, 0xFF00, 0xFF00, 0x0000, 0x0000, 0x0000 },
{ 8, 8 }
}, *crsrNESWptr = &crsrNESW;
static Cursor crsrNONE =
{
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ 0, 0 }
}, *crsrNONEptr = &crsrNONE;
static Cursor crsrARROW =
{
{ 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7E00, 0x7F00,
0x7F80, 0x7C00, 0x6C00, 0x4600, 0x0600, 0x0300, 0x0300, 0x0000 },
{ 0xC000, 0xE000, 0xF000, 0xF800, 0xFC00, 0xFE00, 0xFF00, 0xFF80,
0xFFC0, 0xFFC0, 0xFE00, 0xEF00, 0xCF00, 0x0780, 0x0780, 0x0380 },
{ 1, 1 }
}, *crsrARROWptr = &crsrARROW;
void Fl_Window::cursor(Fl_Cursor c, Fl_Color, Fl_Color) {
if (!shown()) return;
switch (c) {
case FL_CURSOR_CROSS: i->cursor = GetCursor( crossCursor ); break;
case FL_CURSOR_WAIT: i->cursor = GetCursor( watchCursor ); break;
case FL_CURSOR_NS: i->cursor = &crsrNSptr; break;
case FL_CURSOR_INSERT: //++ the following shapes are missing...
case FL_CURSOR_HELP:
case FL_CURSOR_HAND:
case FL_CURSOR_MOVE:
case FL_CURSOR_INSERT: i->cursor = GetCursor( iBeamCursor ); break;
case FL_CURSOR_N:
case FL_CURSOR_S:
case FL_CURSOR_NS: i->cursor = &crsrNSptr; break;
case FL_CURSOR_HELP: i->cursor = &crsrHELPptr; break;
case FL_CURSOR_HAND: i->cursor = &crsrHANDptr; break;
case FL_CURSOR_MOVE: i->cursor = &crsrMOVEptr; break;
case FL_CURSOR_NE:
case FL_CURSOR_SW:
case FL_CURSOR_NESW:
case FL_CURSOR_NESW: i->cursor = &crsrNESWptr; break;
case FL_CURSOR_E:
case FL_CURSOR_W:
case FL_CURSOR_WE:
case FL_CURSOR_WE: i->cursor = &crsrWEptr; break;
case FL_CURSOR_SE:
case FL_CURSOR_NW:
case FL_CURSOR_NWSE:
case FL_CURSOR_ARROW:
case FL_CURSOR_NWSE: i->cursor = &crsrNWSEptr; break;
case FL_CURSOR_NONE: i->cursor = &crsrNONEptr; break;
case FL_CURSOR_ARROW: i->cursor = &crsrARROWptr; break;
case FL_CURSOR_DEFAULT:
default:
i->cursor = fl_default_cursor; break;
@ -224,5 +290,5 @@ void Fl_Window::cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
#endif
//
// End of "$Id: fl_cursor.cxx,v 1.6.2.6.2.1 2001/11/27 17:44:08 easysw Exp $".
// End of "$Id: fl_cursor.cxx,v 1.6.2.6.2.2 2001/12/09 23:45:22 matthiaswm Exp $".
//