summaryrefslogtreecommitdiff
path: root/include/tools/rc.h
blob: 396c8286987e54aa8beb0f28271133f22e7d8839 (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#ifndef INCLUDED_TOOLS_RC_H
#define INCLUDED_TOOLS_RC_H

#include <tools/rcid.h>
#include <o3tl/typed_flags_set.hxx>

// Attributes in *.src files
enum class RSWND {
    NONE         = 0x00,
    DISABLED     = 0x01, // "Disable" attribute
    CLIENTSIZE   = 0x02  // "OutputSize" attribute
};
namespace o3tl {
    template<> struct typed_flags<RSWND> : is_typed_flags<RSWND, 0x03> {};
}

enum class RscWindowFlags {
    XYMapMode                = 0x0001,
    X                        = 0x0002,
    Y                        = 0x0004,
    WHMapMode                = 0x0008,
    Width                    = 0x0010,
    Height                   = 0x0020,
    Text                     = 0x0040,
    QuickText                = 0x0100,
    HelpId                   = 0x0200
};
namespace o3tl {
    template<> struct typed_flags<RscWindowFlags> : is_typed_flags<RscWindowFlags, 0x37F> {};
}

// For "FixedImage" resource:
#define RSC_FIXEDIMAGE_IMAGE            0x0001

// For all menu resources:
enum class RscMenu {
    Items                  = 0x01,
    Text                   = 0x02,
    DefaultItemId          = 0x04
};
namespace o3tl {
    template<> struct typed_flags<RscMenu> : is_typed_flags<RscMenu, 0x07> {};
}

// "MenuItem" resource options:
enum class RscMenuItem {
    Separator          = 0x001,
    Id                 = 0x002,
    Status             = 0x004,
    Text               = 0x008,
    HelpText           = 0x020,
    HelpId             = 0x040,
    Menu               = 0x100,
    Disable            = 0x400,
    Command            = 0x800
};
namespace o3tl {
    template<> struct typed_flags<RscMenuItem> : is_typed_flags<RscMenuItem, 0xd6f> {};
}

// For "Field" resources:

enum class RscNumFormatterFlags {
    Min            = 0x01,
    Max            = 0x02,
    StrictFormat   = 0x04,
    DecimalDigits  = 0x10,
    Value          = 0x20,
};
namespace o3tl {
    template<> struct typed_flags<RscNumFormatterFlags> : is_typed_flags<RscNumFormatterFlags, 0x37> {};
}

#define NUMERICFIELD_FIRST              0x01
#define NUMERICFIELD_LAST               0x02
#define NUMERICFIELD_SPINSIZE           0x04

// For "ToolBoxItem" resources:
enum class RscToolboxItemFlags {
    Id              = 0x0001,
    Type            = 0x0002,
    Status          = 0x0004,
    HelpId          = 0x0008,
    Text            = 0x0010,
    Disable         = 0x0100,
    Hide            = 0x0400,
    Command         = 0x0800
};
namespace o3tl {
    template<> struct typed_flags<RscToolboxItemFlags> : is_typed_flags<RscToolboxItemFlags, 0xd1f> {};
}

// For "ToolBox" resources:
enum class RscToolboxFlags {
    ButtonType          = 0x01,
    Align               = 0x02,
    LineCount           = 0x04,
    ItemList            = 0x80
};
namespace o3tl {
    template<> struct typed_flags<RscToolboxFlags> : is_typed_flags<RscToolboxFlags, 0x87> {};
}

// For "DockingWindow" resources:
#define RSC_DOCKINGWINDOW_XYMAPMODE     0x01
#define RSC_DOCKINGWINDOW_X             0x02
#define RSC_DOCKINGWINDOW_Y             0x04
#define RSC_DOCKINGWINDOW_FLOATING      0x08

// For "ImageButtons":
enum class RscImageButtonFlags {
    Image           = 0x01,
    Symbol          = 0x02,
    State           = 0x04
};
namespace o3tl {
    template<> struct typed_flags<RscImageButtonFlags> : is_typed_flags<RscImageButtonFlags, 0x07> {};
}

// For "Image":
enum class RscImageFlags {
    ImageBitmap       = 0x01,
    MaskColor         = 0x04
};
namespace o3tl {
    template<> struct typed_flags<RscImageFlags> : is_typed_flags<RscImageFlags, 0x05> {};
}

// For "ImageList":
enum class RscImageListFlags {
    MaskColor         = 0x04,
    IdList            = 0x08,
    IdCount           = 0x10
};
namespace o3tl {
    template<> struct typed_flags<RscImageListFlags> : is_typed_flags<RscImageListFlags, 0x1c> {};
}

// FIXME obsolete, should be removed by MM
#define RSC_COLOR                       (RSC_NOTYPE + 0x16)

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */