2 * Copyright 2003-2015, Haiku.
3 * Distributed under the terms of the MIT License.
6 * Adrian Oanca <adioanca@cotty.iren.ro>
7 * Axel Dörfler, axeld@pinc-software.de
10 #define VIEW_PRIVATE_H
14 #include <InterfaceDefs.h>
18 #include <ServerProtocolStructs.h>
22 const static uint32 kDeleteReplicant
= 'JAHA';
24 const static uint32 kWorkspacesViewFlag
= 0x40000000UL
;
25 // was/is _B_RESERVED1_ in View.h
28 B_VIEW_FONT_BIT
= 0x00000001,
29 B_VIEW_HIGH_COLOR_BIT
= 0x00000002,
30 B_VIEW_DRAWING_MODE_BIT
= 0x00000004,
31 B_VIEW_CLIP_REGION_BIT
= 0x00000008,
32 B_VIEW_LINE_MODES_BIT
= 0x00000010,
33 B_VIEW_BLENDING_BIT
= 0x00000020,
34 B_VIEW_SCALE_BIT
= 0x00000040,
35 B_VIEW_FONT_ALIASING_BIT
= 0x00000080,
36 B_VIEW_FRAME_BIT
= 0x00000100,
37 B_VIEW_ORIGIN_BIT
= 0x00000200,
38 B_VIEW_PEN_SIZE_BIT
= 0x00000400,
39 B_VIEW_PEN_LOCATION_BIT
= 0x00000800,
40 B_VIEW_LOW_COLOR_BIT
= 0x00008000,
41 B_VIEW_VIEW_COLOR_BIT
= 0x00010000,
42 B_VIEW_PATTERN_BIT
= 0x00020000,
43 B_VIEW_TRANSFORM_BIT
= 0x00040000,
44 B_VIEW_FILL_RULE_BIT
= 0x00080000,
45 B_VIEW_WHICH_VIEW_COLOR_BIT
= 0x00100000,
46 B_VIEW_WHICH_LOW_COLOR_BIT
= 0x00200000,
47 B_VIEW_WHICH_HIGH_COLOR_BIT
= 0x00400000,
49 B_VIEW_ALL_BITS
= 0x00ffffff,
51 // these used for archiving only
52 B_VIEW_RESIZE_BIT
= 0x00001000,
53 B_VIEW_FLAGS_BIT
= 0x00002000,
54 B_VIEW_EVENT_MASK_BIT
= 0x00004000
58 class BView::Private
{
67 { return fView
->fShowLevel
; }
69 // defined in View.cpp
73 BLayoutItem
* LayoutItemAt(int32 index
);
74 int32
CountLayoutItems();
75 void RegisterLayoutItem(BLayoutItem
* item
);
76 void DeregisterLayoutItem(BLayoutItem
* item
);
79 { return fView
->_RemoveSelf(); }
96 inline bool IsValid(uint32 bit
) const;
97 inline bool IsAllValid() const;
99 void UpdateServerFontState(BPrivate::PortLink
&link
);
100 void UpdateServerState(BPrivate::PortLink
&link
);
102 void UpdateFrom(BPrivate::PortLink
&link
);
108 rgb_color high_color
;
111 // This one is not affected by pop state/push state
112 rgb_color view_color
;
113 color_which which_view_color
;
114 float which_view_color_tint
;
116 // these are cached values
117 color_which which_low_color
;
118 float which_low_color_tint
;
120 color_which which_high_color
;
121 float which_high_color_tint
;
125 ::drawing_mode drawing_mode
;
126 BRegion clipping_region
;
127 bool clipping_region_used
;
132 BAffineTransform transform
;
143 source_alpha alpha_source_mode
;
144 alpha_function alpha_function_mode
;
150 // font aliasing. Used for printing only!
152 // flags used for synchronization with app_server
154 // flags used for archiving
155 uint32 archiving_flags
;
157 // maintain our own rect as seen from the app while printing
163 ViewState::IsValid(uint32 bit
) const
165 return valid_flags
& bit
;
170 ViewState::IsAllValid() const
172 return (valid_flags
& B_VIEW_ALL_BITS
& ~B_VIEW_CLIP_REGION_BIT
)
173 == (B_VIEW_ALL_BITS
& ~B_VIEW_CLIP_REGION_BIT
);
177 } // namespace BPrivate
181 // the max number of points in the array
183 // the current number of points in the array
185 // the array of points
186 ViewLineArrayInfo
* array
;
190 #endif /* VIEW_PRIVATE_H */