2006-02-05 18:14:14 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2001-2006, Haiku.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* DarkWyrm <bpmagic@columbus.rr.com>
|
|
|
|
*/
|
|
|
|
#ifndef CURSOR_SET_H
|
|
|
|
#define CURSOR_SET_H
|
|
|
|
|
2003-07-14 14:37:10 +00:00
|
|
|
|
2003-07-25 15:30:18 +00:00
|
|
|
#include <Bitmap.h>
|
|
|
|
#include <Cursor.h>
|
|
|
|
#include <Message.h>
|
|
|
|
|
2006-02-05 18:14:14 +00:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
B_CURSOR_DEFAULT = 1,
|
2003-07-14 14:37:10 +00:00
|
|
|
B_CURSOR_TEXT,
|
|
|
|
B_CURSOR_MOVE,
|
|
|
|
B_CURSOR_DRAG,
|
|
|
|
B_CURSOR_RESIZE,
|
|
|
|
B_CURSOR_RESIZE_NWSE,
|
|
|
|
B_CURSOR_RESIZE_NESW,
|
|
|
|
B_CURSOR_RESIZE_NS,
|
|
|
|
B_CURSOR_RESIZE_EW,
|
|
|
|
B_CURSOR_OTHER,
|
2003-10-10 02:33:38 +00:00
|
|
|
B_CURSOR_APP,
|
2003-07-14 14:37:10 +00:00
|
|
|
B_CURSOR_INVALID
|
|
|
|
} cursor_which;
|
|
|
|
|
2003-07-25 15:30:18 +00:00
|
|
|
class ServerCursor;
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\brief Class to manage system cursor sets
|
|
|
|
*/
|
2005-07-18 00:22:08 +00:00
|
|
|
class CursorSet : public BMessage {
|
2006-02-05 18:14:14 +00:00
|
|
|
public:
|
|
|
|
CursorSet(const char *name);
|
|
|
|
|
2005-07-18 00:22:08 +00:00
|
|
|
status_t Save(const char *path,int32 saveflags=0);
|
|
|
|
status_t Load(const char *path);
|
|
|
|
status_t AddCursor(cursor_which which,const BBitmap *cursor, const BPoint &hotspot);
|
|
|
|
status_t AddCursor(cursor_which which, int8 *data);
|
|
|
|
void RemoveCursor(cursor_which which);
|
|
|
|
status_t FindCursor(cursor_which which, BBitmap **cursor, BPoint *hotspot);
|
|
|
|
status_t FindCursor(cursor_which which, ServerCursor **cursor);
|
|
|
|
void SetName(const char *name);
|
|
|
|
const char *GetName(void);
|
2006-02-05 18:14:14 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
const char *_CursorWhichToString(cursor_which which);
|
|
|
|
BBitmap *_CursorDataToBitmap(int8 *data);
|
2003-07-25 15:30:18 +00:00
|
|
|
};
|
|
|
|
|
2006-02-05 18:14:14 +00:00
|
|
|
#endif // CURSOR_SET_H
|