forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcpalette.h
More file actions
65 lines (48 loc) · 2.03 KB
/
cpalette.h
File metadata and controls
65 lines (48 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* Copyright (C) 2003-2015 LiveCode Ltd.
This file is part of LiveCode.
LiveCode is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License v3 as published by the Free
Software Foundation.
LiveCode 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 LiveCode. If not see <http://www.gnu.org/licenses/>. */
//
// MCColors class declarations
//
#ifndef COLORS_H
#define COLORS_H
#include "mccontrol.h"
class MCColors;
typedef MCObjectProxy<MCColors>::Handle MCColorsHandle;
class MCColors : public MCControl, public MCMixinObjectHandle<MCColors>
{
public:
enum { kObjectType = CT_COLOR_PALETTE };
using MCMixinObjectHandle<MCColors>::GetHandle;
private:
uint4 selectedcolor;
public:
MCColors();
MCColors(const MCColors &cref);
// virtual functions from MCObject
virtual ~MCColors();
virtual Chunk_term gettype() const;
virtual const char *gettypestring();
virtual bool visit_self(MCObjectVisitor *p_visitor);
virtual Boolean mfocus(int2 x, int2 y);
virtual Boolean mdown(uint2 which);
virtual Boolean mup(uint2 which, bool p_release);
virtual Boolean count(Chunk_term type, MCObject *stop, uint2 &num);
// virtual functions from MCControl
IO_stat load(IO_handle stream, uint32_t version);
IO_stat extendedload(MCObjectInputStream& p_stream, uint32_t version, uint4 p_length);
IO_stat save(IO_handle stream, uint4 p_part, bool p_force_ext, uint32_t p_version);
IO_stat extendedsave(MCObjectOutputStream& p_stream, uint4 p_part, uint32_t p_version);
virtual MCControl *clone(Boolean attach, Object_pos p, bool invisible);
// MW-2011-09-06: [[ Redraw ]] Added 'sprite' option - if true, ink and opacity are not set.
virtual void draw(MCDC *dc, const MCRectangle &dirty, bool p_isolated, bool p_sprite);
};
#endif