Android-cuttlefish cvd tool
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
teeui::Button< Derived, convexElemCount, convexObjectCapacity > Class Template Reference

#include <button.h>

Inheritance diagram for teeui::Button< Derived, convexElemCount, convexObjectCapacity >:
Inheritance graph
[legend]
Collaboration diagram for teeui::Button< Derived, convexElemCount, convexObjectCapacity >:
Collaboration graph
[legend]

Public Member Functions

 Button ()=default
 
template<typename Context >
 Button (const Context &context)
 
Error draw (const PixelDrawer &drawPixel)
 
- Public Member Functions inherited from teeui::LayoutElement< Derived >
 LayoutElement ()=default
 
template<typename Context >
 LayoutElement (const Context &context)
 
Error draw (const PixelDrawer &)
 
Error hit (const Event &)
 
- Public Member Functions inherited from teeui::ButtonImpl
 ButtonImpl ()
 
 ButtonImpl (pxs radius, Color color, Color convexObjectColor, bool roundTopLeft, bool roundTopRight, bool roundBottomLeft, bool roundBottomRight)
 
void setColor (Color color)
 
void setConvexObjectColor (Color color)
 
Error draw (const PixelDrawer &drawPixel, const Box< pxs > &bounds, const ConvexObjectInfo *coBegin, const ConvexObjectInfo *coEnd)
 

Static Public Attributes

static const constexpr bool button_round_top_left = false
 
static const constexpr bool button_round_top_right = false
 
static const constexpr bool button_round_bottom_left = false
 
static const constexpr bool button_round_bottom_right = false
 
static const constexpr std::tuple button_drawable_objects = {}
 
static const constexpr Color button_drawable_object_color = 0xff000000
 

Private Attributes

ConvexObject< convexObjectCapacity::value > convex_objects_ [convexElemCount::value]
 

Additional Inherited Members

- Public Attributes inherited from teeui::LayoutElement< Derived >
Box< pxsbounds_
 

Detailed Description

template<typename Derived, typename convexElemCount = std::integral_constant<size_t, 0>, typename convexObjectCapacity = std::integral_constant<size_t, 10>>
class teeui::Button< Derived, convexElemCount, convexObjectCapacity >

Button is a LayoutElement and should be used as second argument in the BEGIN_ELEMENT() macro. The template argument Derived is the new class derived from Button, that is created by the BEGIN_ELEMENT() macro. The arguments convexElemCount and convexObjectCapacity denote the number of convex objects and the capacity (maximum number of vertexes) each of the objects should have. This is used to reserve enough space at compile time.

Constructor & Destructor Documentation

◆ Button() [1/2]

template<typename Derived , typename convexElemCount = std::integral_constant<size_t, 0>, typename convexObjectCapacity = std::integral_constant<size_t, 10>>
teeui::Button< Derived, convexElemCount, convexObjectCapacity >::Button ( )
default

◆ Button() [2/2]

template<typename Derived , typename convexElemCount = std::integral_constant<size_t, 0>, typename convexObjectCapacity = std::integral_constant<size_t, 10>>
template<typename Context >
teeui::Button< Derived, convexElemCount, convexObjectCapacity >::Button ( const Context &  context)
inlineexplicit

Member Function Documentation

◆ draw()

template<typename Derived , typename convexElemCount = std::integral_constant<size_t, 0>, typename convexObjectCapacity = std::integral_constant<size_t, 10>>
Error teeui::Button< Derived, convexElemCount, convexObjectCapacity >::draw ( const PixelDrawer drawPixel)
inline

Member Data Documentation

◆ button_drawable_object_color

template<typename Derived , typename convexElemCount = std::integral_constant<size_t, 0>, typename convexObjectCapacity = std::integral_constant<size_t, 10>>
const constexpr Color teeui::Button< Derived, convexElemCount, convexObjectCapacity >::button_drawable_object_color = 0xff000000
staticconstexpr

◆ button_drawable_objects

template<typename Derived , typename convexElemCount = std::integral_constant<size_t, 0>, typename convexObjectCapacity = std::integral_constant<size_t, 10>>
const constexpr std::tuple teeui::Button< Derived, convexElemCount, convexObjectCapacity >::button_drawable_objects = {}
staticconstexpr

◆ button_round_bottom_left

template<typename Derived , typename convexElemCount = std::integral_constant<size_t, 0>, typename convexObjectCapacity = std::integral_constant<size_t, 10>>
const constexpr bool teeui::Button< Derived, convexElemCount, convexObjectCapacity >::button_round_bottom_left = false
staticconstexpr

◆ button_round_bottom_right

template<typename Derived , typename convexElemCount = std::integral_constant<size_t, 0>, typename convexObjectCapacity = std::integral_constant<size_t, 10>>
const constexpr bool teeui::Button< Derived, convexElemCount, convexObjectCapacity >::button_round_bottom_right = false
staticconstexpr

◆ button_round_top_left

template<typename Derived , typename convexElemCount = std::integral_constant<size_t, 0>, typename convexObjectCapacity = std::integral_constant<size_t, 10>>
const constexpr bool teeui::Button< Derived, convexElemCount, convexObjectCapacity >::button_round_top_left = false
staticconstexpr

◆ button_round_top_right

template<typename Derived , typename convexElemCount = std::integral_constant<size_t, 0>, typename convexObjectCapacity = std::integral_constant<size_t, 10>>
const constexpr bool teeui::Button< Derived, convexElemCount, convexObjectCapacity >::button_round_top_right = false
staticconstexpr

◆ convex_objects_

template<typename Derived , typename convexElemCount = std::integral_constant<size_t, 0>, typename convexObjectCapacity = std::integral_constant<size_t, 10>>
ConvexObject<convexObjectCapacity::value> teeui::Button< Derived, convexElemCount, convexObjectCapacity >::convex_objects_[convexElemCount::value]
private

The documentation for this class was generated from the following file: