gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
JackPortMonitorGui Class Reference

#include <JackPortMonitorGui.H>

Inheritance diagram for JackPortMonitorGui:
[legend]
Collaboration diagram for JackPortMonitorGui:
[legend]

Public Types

enum  { CONNECT_PORTS, DISCONNECT_PORTS }
 
- Public Types inherited from Box
enum  {
  EXPAND =1, FILL =2, START =4, RESET =8,
  END =16, NOFILL =32, NOEXPAND =64
}
 

Public Member Functions

virtual void reSyncPorts (void)
 
virtual void reSyncConnections (void)
 
void reDrawConnections ()
 
 JackPortMonitorGui ()
 
 JackPortMonitorGui (bool monitorPorts)
 
 JackPortMonitorGui (bool monitorPorts, bool autoConnectNetClientsIn)
 
 JackPortMonitorGui (string clientName_)
 
 JackPortMonitorGui (string clientName_, bool monitorPorts)
 
 JackPortMonitorGui (string clientName_, bool monitorPorts, bool autoConnectNetClientsIn)
 
 JackPortMonitorGui (string clientName_, string serverName)
 
 JackPortMonitorGui (string clientName_, string serverName, bool monitorPorts)
 
 JackPortMonitorGui (string clientName_, string serverName, bool monitorPorts, bool autoConnectNetClientsIn)
 
virtual ~JackPortMonitorGui ()
 Destructor. More...
 
- Public Member Functions inherited from JackPortMonitor
 JackPortMonitor ()
 
 JackPortMonitor (bool monitorPorts)
 
 JackPortMonitor (bool monitorPorts, bool autoConnectNetClientsIn)
 
 JackPortMonitor (string clientName_)
 
 JackPortMonitor (string clientName_, bool monitorPorts)
 
 JackPortMonitor (string clientName_, bool monitorPorts, bool autoConnectNetClientsIn)
 
 JackPortMonitor (string clientName_, string serverName)
 
 JackPortMonitor (string clientName_, string serverName, bool monitorPorts)
 
 JackPortMonitor (string clientName_, string serverName, bool monitorPorts, bool autoConnectNetClients)
 
 JackPortMonitor (JackBase &jb)
 
virtual ~JackPortMonitor ()
 Destructor. More...
 
virtual void print (ostream &os)
 
void connectPortRenameCallback (void)
 
void connectPortRegistrationCallback (void)
 
void connectPortConnectCallback (void)
 
- Public Member Functions inherited from JackBase
 JackBase ()
 
 JackBase (string clientName_)
 
 JackBase (string clientName_, string serverName)
 
virtual ~JackBase ()
 Destructor. More...
 
virtual int stopClient (void)
 
int getSampleRate (void) const
 
virtual int createPorts (string inName, int inCnt, string outName, int outCnt)
 
virtual int destroyPorts ()
 
void getPhysicalPorts (vector< jack_port_t *> &inPorts, vector< jack_port_t *> &outPorts)
 
void getPhysicalPortCount (int &in, int &out)
 
bool connected ()
 
string getClientName ()
 
virtual void setClientName (string cn)
 
string portNameFromPort (jack_port_id_t p)
 
string portNameFromPort (jack_port_t *p)
 
string clientNameFromPort (jack_port_id_t p)
 
string clientNameFromPort (jack_port_t *p)
 
string clientNameFromPortName (string fullPortName)
 
string clientNameFromPortNames (string fullPortName, string shortPortName)
 
string shortPortNameFromPortName (const string fullPortName)
 
bool operator== (const string &cn)
 
int getInputPortSize ()
 
jack_port_t * getInputPort (int i)
 
jack_port_t * getOutputPort (int i)
 
void addInputPort (jack_port_t *inP)
 
void addOutputPort (jack_port_t *outP)
 
int populatInOutPorts (const string &inName, vector< string > &inPorts, const string &outName, vector< string > &outPorts)
 
int connectPorts (const string inName, const string outName)
 
virtual int disconnectPorts (const string &inName, const string &outName)
 
void setClient (jack_client_t *c)
 
- Public Member Functions inherited from WaitingThread
virtual ~WaitingThread (void)
 
- Public Member Functions inherited from ThreadedMethod
virtual int run (int priority=0)
 
- Public Member Functions inherited from Thread
 Thread (void)
 
virtual ~Thread (void)
 
void * stop (void)
 
int run (void *(*start_routine)(void *), void *data, int priority=0)
 
int setPriority (pthread_attr_t *attributes, int priority)
 
int getPriority ()
 
void * meetThread (void)
 
void exit (void *retVal)
 
bool running ()
 
- Public Member Functions inherited from HBox
 HBox ()
 
- Public Member Functions inherited from Box
 Box (void)
 constructor More...
 
Boxoperator<< (BoxIS bis)
 destructor destroys the widget to neatly cleanup. More...
 
Boxoperator<< (Box &b)
 
Boxoperator<< (int val)
 
Boxoperator<< (Box *b)
 
Boxoperator<< (Container &b)
 
Boxoperator<< (Container *b)
 
Boxoperator<< (GtkWidget *b)
 
Boxoperator<< (Widget *w)
 
Boxoperator<< (Widget &w)
 
Boxoperator<< (LinkList< GtkWidget *> &ll)
 
Boxoperator>> (GtkWidget *b)
 
Boxoperator>> (Container *b)
 
Boxoperator>> (Container &b)
 
Boxoperator= (const Box b)
 
- Public Member Functions inherited from BoxIS
 BoxIS (void)
 
 BoxIS (bool expandIn, bool fillIn)
 
 BoxIS (bool expandIn, bool fillIn, bool startIn)
 
void reset (void)
 
void setDefaultStart (bool startIn)
 
void setDefaultExpand (bool expandIn)
 
void setDefaultFill (bool fillIn)
 
BoxISoperator= (BoxIS &bis)
 
BoxISoperator= (const BoxIS bis)
 
void dump (void)
 
- Public Member Functions inherited from Container
void setBorder (unsigned int size)
 
unsigned int getBorder (void)
 
Containeroperator<< (Container &c)
 
Containeroperator<< (Container *c)
 
Containeroperator<< (Widget &w)
 
Containeroperator<< (Widget *w)
 
Containeroperator<< (LinkList< GtkWidget *> &ll)
 
Containeroperator>> (GtkWidget *w)
 
Containeroperator>> (Container *c)
 
Containeroperator>> (Container &c)
 
Containeroperator>> (LinkList< GtkWidget *> &ll)
 
void setChildrensSensitivity (bool sens)
 
bool areAnyChildrensSensitive (void)
 
unsigned int size ()
 
- Public Member Functions inherited from Widget
 Widget ()
 Construcotr. More...
 
 Widget (GtkWidget *w)
 
virtual ~Widget ()
 Destructor. More...
 
GtkWidget * ref (void)
 
void unref (void)
 
GtkWidget * show (void)
 
GtkWidget * hide (void)
 
bool getVisible (void)
 
GtkWidget * getWidget (void)
 
bool getSensitive (void)
 
void setSensitive (bool sens)
 
void getSize (int &width, int &height)
 
virtual void setSize (int width, int height)
 
void getLocationSize (int &x, int &y, int &width, int &height)
 
void queueDraw ()
 
GdkWindow * getWindow ()
 
void connect (const char *event, GCallback callback, gpointer data)
 
void connectAfter (const char *event, GCallback callback, gpointer data)
 
void connectExposeEventCallback (GCallback callback, void *data)
 
void connectExposeEventCallback (GtkWidget *w, GCallback callback, void *data)
 
void connectConfigureEventCallback (GCallback callback, void *data)
 
void connectConfigureEventCallback (GtkWidget *w, GCallback callback, void *data)
 
Widgetoperator<< (DragNDrop &dnd)
 
Widgetoperator>> (DragNDrop &dnd)
 

Private Member Functions

void init ()
 
virtual void jackPortConnected (jack_port_id_t a, jack_port_id_t b, int connect)
 
virtual void jackPortRegistered (jack_port_id_t port, int reg)
 
virtual void jackPortRenamed (jack_port_id_t port, const char *oldName, const char *newName)
 

Static Private Member Functions

static bool exposeEventStatic (GtkWidget *widget, GdkEvent *event, gpointer data)
 
static gboolean reDrawConnectionsStatic (GtkWidget *widget, GdkEventConfigure *event, gpointer data)
 
static void connect1To1Static (GtkWidget *widget, gpointer data)
 
static void autoConnectNetClientsPortsStatic (GtkWidget *widget, gpointer data)
 

Private Attributes

VBox inputPortBox
 A box with all of the input half duplex GUIs stacked. More...
 
VBox outputPortBox
 A box with all of the output half duplex GUIs stacked. More...
 
ConnectionSurface connectionSurface
 Draws client port connections. More...
 

Additional Inherited Members

- Public Attributes inherited from JackBase
bool connect1To1
 When true, then connections are made in a 1 to 1 manner. When False, then connections are made in an all to all manner. More...
 
- Public Attributes inherited from WaitingThread
Cond cond
 
- Public Attributes inherited from BoxIS
bool expand
 Set to expand the box contents. More...
 
bool fill
 Set to fill the box. More...
 
bool start
 Set to pack the start. More...
 
- Protected Member Functions inherited from JackPortMonitor
virtual void autoConnectNetClientsPorts (void)
 
- Protected Member Functions inherited from JackBase
virtual void determineLatencies ()
 
int getPortListAndCount (JackPortFlags flags, vector< jack_port_t *> *ports, const char *portNamePattern, const char *typeNamePattern)
 
int getPortListAndCount (JackPortFlags flags, vector< string > *ports, const char *portNamePattern, const char *typeNamePattern)
 
- Protected Member Functions inherited from Box
virtual void pack (GtkWidget *obj)
 
- Protected Member Functions inherited from Widget
virtual bool checkDropValidity (GtkWidget *w, GtkWidget *sourceWidget, int info, const unsigned char *selectionStoredData)
 
virtual bool dragDataReceived (GtkWidget *w, GtkWidget *sourceWidget, int info, const unsigned char *selectionStoredData, int length)
 
virtual void dragLeave (GtkWidget *w, GtkWidget *sourceWidget)
 
virtual bool dragMotion (GtkWidget *w, GtkWidget *sourceWidget, int x, int y)
 
virtual int chooseTheTargetToUse (GtkWidget *w, GtkWidget *sourceWidget, DragNDrop &dnd)
 
virtual void dragDataGet (GtkWidget *w, GtkSelectionData *selectionData, guint info)
 
virtual void dragDataDelete (GtkWidget *w)
 
virtual void dragBegin (GtkWidget *w)
 
virtual void dragEnd (GtkWidget *w)
 
- Protected Attributes inherited from JackPortMonitor
vector< JackBaseWithPortNames * > knownClients
 A vector of clients and their ports both ids and names. More...
 
bool autoConnectNetClients
 When true, autoconnect networked client's ports to the system ports. More...
 
- Protected Attributes inherited from JackBase
jack_client_t * client
 The jack client. More...
 
string clientName
 The name of this client. More...
 
jack_options_t jackOptions
 Options for jack. More...
 
jack_status_t status
 The status of jack. More...
 
int physicalInputPortCnt
 The number of physical input ports. More...
 
int physicalOutputPortCnt
 The number of physical input ports. More...
 
vector< jack_port_t * > inputPorts
 The input ports. More...
 
vector< jack_port_t * > outputPorts
 The output ports. More...
 
vector< jack_nframes_t > inputLatencies
 The input latencies, one for each port. More...
 
vector< jack_nframes_t > outputLatencies
 The output latencies, one for each port. More...
 
- Protected Attributes inherited from Widget
GtkWidget * widget
 The container based widget. More...
 

Detailed Description

GUI to give control and a visual of the various Jack clients/ports and their connections. The inherited horizontally stacking box allows the input clients, connections and output clients to be stacked.

NOTE: This class requires linking against the gtkIOStream library.

Definition at line 184 of file JackPortMonitorGui.H.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
CONNECT_PORTS 
DISCONNECT_PORTS 

Definition at line 251 of file JackPortMonitorGui.H.

Constructor & Destructor Documentation

◆ JackPortMonitorGui() [1/9]

JackPortMonitorGui::JackPortMonitorGui ( )

Constructor. Doesn't connect the jack client. By default monitors ports.

Definition at line 346 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ JackPortMonitorGui() [2/9]

JackPortMonitorGui::JackPortMonitorGui ( bool  monitorPorts)

Constructor. Doesn't connect the jack client.

Parameters
monitorPortsTrue if port monitoring callbacks are connected, false and ports aren't monitored.

Definition at line 350 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ JackPortMonitorGui() [3/9]

JackPortMonitorGui::JackPortMonitorGui ( bool  monitorPorts,
bool  autoConnectNetClientsIn 
)

Constructor. Doesn't connect the jack client.

Parameters
monitorPortsTrue if port monitoring callbacks are connected, false and ports aren't monitored.
autoConnectNetClientsInIf true, autoconnect network clients.

Definition at line 354 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ JackPortMonitorGui() [4/9]

JackPortMonitorGui::JackPortMonitorGui ( string  clientName_)

Constructor. Connecting the client to the default server. By default monitors ports.

Parameters
clientName_The client name, which will initiate a server connection.

Definition at line 358 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ JackPortMonitorGui() [5/9]

JackPortMonitorGui::JackPortMonitorGui ( string  clientName_,
bool  monitorPorts 
)

Constructor. Connecting the client to a particular server.

Parameters
clientName_The client name, which will initiate a server connection.
monitorPortsIf true, then monitor changes to the prots and connections.

Definition at line 362 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ JackPortMonitorGui() [6/9]

JackPortMonitorGui::JackPortMonitorGui ( string  clientName_,
bool  monitorPorts,
bool  autoConnectNetClientsIn 
)

Constructor. Connecting the client to a particular server.

Parameters
clientName_The client name, which will initiate a server connection.
monitorPortsIf true, then monitor changes to the prots and connections.
autoConnectNetClientsInIf true, autoconnect network clients.

Definition at line 366 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ JackPortMonitorGui() [7/9]

JackPortMonitorGui::JackPortMonitorGui ( string  clientName_,
string  serverName 
)

Constructor. Connecting the client to a particular server. By default monitors ports.

Parameters
clientName_The client name, which will initiate a server connection.
serverNameThe server to connect to.

Definition at line 370 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ JackPortMonitorGui() [8/9]

JackPortMonitorGui::JackPortMonitorGui ( string  clientName_,
string  serverName,
bool  monitorPorts 
)

Constructor. Connecting the client to a particular server.

Parameters
clientName_The client name, which will initiate a server connection.
serverNameThe server to connect to.
monitorPortsIf true, then monitor changes to the prots and connections.

Definition at line 374 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ JackPortMonitorGui() [9/9]

JackPortMonitorGui::JackPortMonitorGui ( string  clientName_,
string  serverName,
bool  monitorPorts,
bool  autoConnectNetClientsIn 
)

Constructor. Connecting the client to a particular server.

Parameters
clientName_The client name, which will initiate a server connection.
serverNameThe server to connect to.
monitorPortsIf true, then monitor changes to the prots and connections.
autoConnectNetClientsInIf true, autoconnect network clients.

Definition at line 378 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ ~JackPortMonitorGui()

virtual JackPortMonitorGui::~JackPortMonitorGui ( )
inlinevirtual

Destructor.

Definition at line 322 of file JackPortMonitorGui.H.

Member Function Documentation

◆ autoConnectNetClientsPortsStatic()

static void JackPortMonitorGui::autoConnectNetClientsPortsStatic ( GtkWidget *  widget,
gpointer  data 
)
inlinestaticprivate

When checked, then network clients are auto-connected to system ports.

Parameters
widgetThe widget receiving the event.
dataThe instance of Surface which is associated with the widget/event

Definition at line 246 of file JackPortMonitorGui.H.

Here is the call graph for this function:

◆ connect1To1Static()

static void JackPortMonitorGui::connect1To1Static ( GtkWidget *  widget,
gpointer  data 
)
inlinestaticprivate

When checked, then connections are made 1 to 1. When not checked then connections are made all to all.

Parameters
widgetThe widget receiving the event.
dataThe instance of Surface which is associated with the widget/event

Definition at line 236 of file JackPortMonitorGui.H.

Here is the call graph for this function:

◆ exposeEventStatic()

static bool JackPortMonitorGui::exposeEventStatic ( GtkWidget *  widget,
GdkEvent *  event,
gpointer  data 
)
inlinestaticprivate

Definition at line 191 of file JackPortMonitorGui.H.

Here is the call graph for this function:

◆ init()

void JackPortMonitorGui::init ( void  )
private

Initialiser for this class.

Definition at line 206 of file JackPortMonitorGui.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ jackPortConnected()

void JackPortMonitorGui::jackPortConnected ( jack_port_id_t  a,
jack_port_id_t  b,
int  connect 
)
privatevirtual

Method to handle the occasion where ports were connected or disconnected.

Parameters
aA port (dis)connected
bA port (dis)connected
connect0 for connection removed, connection made otherwise

Reimplemented from JackPortMonitor.

Definition at line 240 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ jackPortRegistered()

void JackPortMonitorGui::jackPortRegistered ( jack_port_id_t  port,
int  reg 
)
privatevirtual

Method to handle to handle port registration or deregistration.

Parameters
portThe port which was (de)registered.
regZero if the port is deregistered, otherwise registration.

Reimplemented from JackPortMonitor.

Definition at line 246 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ jackPortRenamed()

void JackPortMonitorGui::jackPortRenamed ( jack_port_id_t  port,
const char *  oldName,
const char *  newName 
)
privatevirtual

Method to handle port renaming.

Parameters
portThe port which was renamed.
oldNameThe original name of the port.
newNameThe new name of the port.

Reimplemented from JackPortMonitor.

Definition at line 252 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ reDrawConnections()

void JackPortMonitorGui::reDrawConnections ( )

Redraw all of the connections on the connectionSurface.

Definition at line 336 of file JackPortMonitorGui.C.

◆ reDrawConnectionsStatic()

static gboolean JackPortMonitorGui::reDrawConnectionsStatic ( GtkWidget *  widget,
GdkEventConfigure *  event,
gpointer  data 
)
inlinestaticprivate

When a configure-event is triggered on the connection surface,

Parameters
widgetThe widget receiving the event.
eventThe event which triggered the configure-event signal
dataThe instance of Surface which is associated with the widget/event
Returns
true to finish processing, false to allow other handlers to process.

Definition at line 226 of file JackPortMonitorGui.H.

◆ reSyncConnections()

void JackPortMonitorGui::reSyncConnections ( void  )
virtual

Ensure all ports connections are depicted.

Reimplemented from JackPortMonitor.

Definition at line 297 of file JackPortMonitorGui.C.

Here is the call graph for this function:

◆ reSyncPorts()

void JackPortMonitorGui::reSyncPorts ( void  )
virtual

Rebuild the client and port connection GUI from the client's knowledge of their own IO ports.

Reimplemented from JackPortMonitor.

Definition at line 258 of file JackPortMonitorGui.C.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ connectionSurface

ConnectionSurface JackPortMonitorGui::connectionSurface
private

Draws client port connections.

Definition at line 189 of file JackPortMonitorGui.H.

◆ inputPortBox

VBox JackPortMonitorGui::inputPortBox
private

A box with all of the input half duplex GUIs stacked.

Definition at line 186 of file JackPortMonitorGui.H.

◆ outputPortBox

VBox JackPortMonitorGui::outputPortBox
private

A box with all of the output half duplex GUIs stacked.

Definition at line 187 of file JackPortMonitorGui.H.


The documentation for this class was generated from the following files:
gtkIOStream: JackPortMonitorGui Class Reference
GTK+ IOStream  Beta