libSmarties  1.3.1
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | Protected Member Functions
smarties::Smarties Class Reference

Smarties central class. More...

#include <Smarties.h>

Inherits OscPacketListener.

Public Member Functions

SmartiesPuckgetPuck (int id)
 Return the SmartiesPuck with the given identifier or null if there is no puck with such an identifier. More...
 
puckMapping getPuckMapping (void)
 
SmartiesDevicegetDevice (char *ip)
 
deviceMapping getDevicesMapping (void)
 
SmartiesEventgetNextEvent ()
 Return the next SmartiesEvent or null if there are no more events. More...
 
void movePuck (int id, float x, float y)
 Move the SmartiesPuck with the given identifier. More...
 
void deletePuck (int id)
 
void deletePuck (SmartiesPuck *p)
 
void sendPuckCursorType (SmartiesPuck *p, char *ip=NULL, int cursor_type=-1)
 
void sendPuckColor (SmartiesPuck *p, char *ip, int color)
 
SmartiesPuckcreatePuck (SmartiesDevice *d, float x, float y, bool select)
 
void showKeyboard (int id, char *ip, int num_keys=0)
 
void showKeyboard (int id, SmartiesDevice *d, int num_keys=0)
 
void sendWidgetLabel (int wid, std::string *str, char *ip)
 
void sendWidgetLabel (int wid, std::string *str, SmartiesDevice *dev=NULL)
 
void sendWidgetFontSize (int wid, int size, SmartiesDevice *dev=NULL)
 
void sendWidgetFontSize (int wid, int size, char *ip)
 
void sendWidgetItem (int wid, int item, SmartiesDevice *dev=NULL)
 
void sendWidgetItem (int wid, int item, char *ip)
 
void sendWidgetValue (int wid, int value, SmartiesDevice *dev=NULL)
 
void sendWidgetValue (int wid, int value, char *ip)
 
void sendWidgetOnState (int wid, bool onstate, SmartiesDevice *dev=NULL)
 
void sendWidgetOnState (int wid, bool onstate, char *ip)
 
void replaceWidgetItemsList (int wid, std::vector< std::string > items)
 
void addItemInWidgetList (int wid, std::string item, int pos)
 
void removeItemInWidgetList (int uid, int pos)
 
void sendWidgetCheckedItems (int wid, std::vector< bool > checked_items, SmartiesDevice *dev=NULL)
 
void sendWidgetCheckedItems (int wid, std::vector< bool > checked_items, char *ip)
 
void sendWidgetState (int wid, int state, SmartiesDevice *dev=NULL)
 
void sendWidgetState (int wid, int state, char *ip)
 
void sendNotification (int soundType, int soundDuration, int vibration, std::string *str, SmartiesDevice *dev=NULL)
 
void sendNotification (int soundType, int soundDuration, int vibration, std::string *str, char *ip)
 
void initWidgets (int wgridx, int wgridy)
 
SmartiesWidgetaddWidget (int *pid, int type, std::string label, float x, float y, float w, float h)
 
SmartiesWidgetgetWidget (int uid)
 
void setPureTouchpad (bool v)
 
void setPureWidgetArea (bool v)
 
void setDeviceOrientation (int v)
 
void createOnePuckByDevice (bool v)
 
void setInterfaceButtons (bool pb, bool sb, bool di, bool si)
 
void setSharingPolicyMedium ()
 
void setSharingPolicyStrict ()
 
void setSharingPolicyPermissive ()
 
void setSharingPolicyCustom ()
 
void setSmartiesTouchEventsConf (bool v, SmartiesDevice *dev)
 
void setSmartiesTouchEventsConf (bool v)
 
void setRawTouchEventsConf (bool v, SmartiesDevice *dev)
 
void setRawTouchEventsConf (bool v)
 
void setHideLockedPucks (bool v, SmartiesDevice *dev)
 
void setHideLockedPucks (bool v)
 
void setAccelerationParameters (float maxCDgainFactor, float minCDgainMM, SmartiesDevice *dev)
 
void setAccelerationParameters (float maxCDgainFactor, float minCDgainMM)
 
void Run (void)
 
void init (int port, int aw, int ah, int gridx, int gridy)
 
void initDefaults (int16_t type, uint64_t flags)
 

Protected Member Functions

void ProcessMessage (const osc::ReceivedMessage &m, const IpEndpointName &remoteEndpoint)
 

Detailed Description

Smarties central class.

Author
Olivier Chapuis
Version
1.1.0
Since
1.0.0

Member Function Documentation

void smarties::Smarties::addItemInWidgetList ( int  wid,
std::string  item,
int  pos 
)
SmartiesWidget * smarties::Smarties::addWidget ( int *  pid,
int  type,
std::string  label,
float  x,
float  y,
float  w,
float  h 
)
void smarties::Smarties::createOnePuckByDevice ( bool  v)
SmartiesPuck * smarties::Smarties::createPuck ( SmartiesDevice d,
float  x,
float  y,
bool  select 
)
void smarties::Smarties::deletePuck ( int  id)
void smarties::Smarties::deletePuck ( SmartiesPuck p)
SmartiesDevice * smarties::Smarties::getDevice ( char *  ip)
deviceMapping smarties::Smarties::getDevicesMapping ( void  )
SmartiesEvent * smarties::Smarties::getNextEvent ( )

Return the next SmartiesEvent or null if there are no more events.

Returns
a SmartiesEvent or null
SmartiesPuck * smarties::Smarties::getPuck ( int  id)

Return the SmartiesPuck with the given identifier or null if there is no puck with such an identifier.

Parameters
ididentifier
Returns
a SmartiesPuck or null
puckMapping smarties::Smarties::getPuckMapping ( void  )
SmartiesWidget * smarties::Smarties::getWidget ( int  uid)
void smarties::Smarties::init ( int  port,
int  aw,
int  ah,
int  gridx,
int  gridy 
)
void smarties::Smarties::initDefaults ( int16_t  type,
uint64_t  flags 
)
void smarties::Smarties::initWidgets ( int  wgridx,
int  wgridy 
)
void smarties::Smarties::movePuck ( int  id,
float  x,
float  y 
)

Move the SmartiesPuck with the given identifier.

The position is relative, i.e., specified by a point in [0,1]x[0,1]. The point (0,0) is top-left.

Parameters
ididentifier
xx coordinate
yy coordinate
void smarties::Smarties::ProcessMessage ( const osc::ReceivedMessage &  m,
const IpEndpointName &  remoteEndpoint 
)
protected
void smarties::Smarties::removeItemInWidgetList ( int  uid,
int  pos 
)
void smarties::Smarties::replaceWidgetItemsList ( int  wid,
std::vector< std::string >  items 
)
void smarties::Smarties::Run ( void  )
void smarties::Smarties::sendNotification ( int  soundType,
int  soundDuration,
int  vibration,
std::string *  str,
SmartiesDevice dev = NULL 
)
void smarties::Smarties::sendNotification ( int  soundType,
int  soundDuration,
int  vibration,
std::string *  str,
char *  ip 
)
void smarties::Smarties::sendPuckColor ( SmartiesPuck p,
char *  ip,
int  color 
)
void smarties::Smarties::sendPuckCursorType ( SmartiesPuck p,
char *  ip = NULL,
int  cursor_type = -1 
)
void smarties::Smarties::sendWidgetCheckedItems ( int  wid,
std::vector< bool >  checked_items,
SmartiesDevice dev = NULL 
)
void smarties::Smarties::sendWidgetCheckedItems ( int  wid,
std::vector< bool >  checked_items,
char *  ip 
)
void smarties::Smarties::sendWidgetFontSize ( int  wid,
int  size,
SmartiesDevice dev = NULL 
)
void smarties::Smarties::sendWidgetFontSize ( int  wid,
int  size,
char *  ip 
)
void smarties::Smarties::sendWidgetItem ( int  wid,
int  item,
SmartiesDevice dev = NULL 
)
void smarties::Smarties::sendWidgetItem ( int  wid,
int  item,
char *  ip 
)
void smarties::Smarties::sendWidgetLabel ( int  wid,
std::string *  str,
char *  ip 
)
void smarties::Smarties::sendWidgetLabel ( int  wid,
std::string *  str,
SmartiesDevice dev = NULL 
)
void smarties::Smarties::sendWidgetOnState ( int  wid,
bool  onstate,
SmartiesDevice dev = NULL 
)
void smarties::Smarties::sendWidgetOnState ( int  wid,
bool  onstate,
char *  ip 
)
void smarties::Smarties::sendWidgetState ( int  wid,
int  state,
SmartiesDevice dev = NULL 
)
void smarties::Smarties::sendWidgetState ( int  wid,
int  state,
char *  ip 
)
void smarties::Smarties::sendWidgetValue ( int  wid,
int  value,
SmartiesDevice dev = NULL 
)
void smarties::Smarties::sendWidgetValue ( int  wid,
int  value,
char *  ip 
)
void smarties::Smarties::setAccelerationParameters ( float  maxCDgainFactor,
float  minCDgainMM,
SmartiesDevice dev 
)
void smarties::Smarties::setAccelerationParameters ( float  maxCDgainFactor,
float  minCDgainMM 
)
void smarties::Smarties::setDeviceOrientation ( int  v)
void smarties::Smarties::setHideLockedPucks ( bool  v,
SmartiesDevice dev 
)
void smarties::Smarties::setHideLockedPucks ( bool  v)
void smarties::Smarties::setInterfaceButtons ( bool  pb,
bool  sb,
bool  di,
bool  si 
)
void smarties::Smarties::setPureTouchpad ( bool  v)
void smarties::Smarties::setPureWidgetArea ( bool  v)
void smarties::Smarties::setRawTouchEventsConf ( bool  v,
SmartiesDevice dev 
)
void smarties::Smarties::setRawTouchEventsConf ( bool  v)
void smarties::Smarties::setSharingPolicyCustom ( )
void smarties::Smarties::setSharingPolicyMedium ( )
void smarties::Smarties::setSharingPolicyPermissive ( )
void smarties::Smarties::setSharingPolicyStrict ( )
void smarties::Smarties::setSmartiesTouchEventsConf ( bool  v,
SmartiesDevice dev 
)
void smarties::Smarties::setSmartiesTouchEventsConf ( bool  v)
void smarties::Smarties::showKeyboard ( int  id,
char *  ip,
int  num_keys = 0 
)
void smarties::Smarties::showKeyboard ( int  id,
SmartiesDevice d,
int  num_keys = 0 
)

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