24 #ifndef FWIDGET_FLAGS_H 25 #define FWIDGET_FLAGS_H 27 #if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT) 28 #error "Only <final/final.h> can be included directly." 31 #include "final/ftypes.h" 40 inline auto checkBits (
const T& subset,
const T& superset) ->
bool 42 static_assert(
sizeof(T) ==
sizeof(uInt16),
"Must be a 16-bit struct" );
45 std::memcpy(&a, &subset,
sizeof(T));
46 std::memcpy(&b, &superset,
sizeof(T));
57 uInt16 scrollable : 1;
59 uInt16 minimizable : 1;
62 uInt16 no_underline : 1;
63 uInt16 ignore_padding : 1;
73 uInt16 always_on_top : 1;
74 uInt16 visible_cursor : 1;
75 uInt16 initialize_layout : 1;
89 uInt16 trans_shadow : 1;
95 uInt16 window_widget : 1;
96 uInt16 dialog_widget : 1;
97 uInt16 menu_widget : 1;
111 inline auto containsFWidgetFlags (
const FWidgetFlags& subset
114 return internal::checkBits (subset.feature, superset.feature)
115 && internal::checkBits (subset.visibility, superset.visibility)
116 && internal::checkBits (subset.focus, superset.focus)
117 && internal::checkBits (subset.shadow, superset.shadow)
118 && internal::checkBits (subset.type, superset.type);
123 #endif // FWIDGET_FLAGS_H
Definition: class_template.cpp:25