gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
JackPortMonitorGui.C
Go to the documentation of this file.
1 /* Copyright 2000-2018 Matt Flax <flatmax@flatmax.org>
2  This file is part of GTK+ IOStream class set
3 
4  GTK+ IOStream is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  GTK+ IOStream is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You have received a copy of the GNU General Public License
15  along with GTK+ IOStream
16  */
17 
18 /*
19 Author: Matt Flax <flatmax@flatmax.org>
20 Date: 2014.10.08
21 */
22 
23 #include "Window.H"
24 #include "JackPortMonitorGui.H"
25 using namespace std;
26 
27 static void quit(void *wid, gpointer data){
28  gtk_main_quit();
29 }
30 
31 int main(int argc, char *argv[]) {
32  gdk_threads_init();
33  gdk_threads_enter();
34  gtk_init( &argc, &argv );
35 
36  bool monitorPorts=true, autoConnectNetClients=true;
37  JackPortMonitorGui jackPMG(monitorPorts, autoConnectNetClients); // init the jack port manager, use the non gui client type.
38 
39  jackPMG.reSyncPorts();
40 
41  cout<<"Jack : sample rate set to : "<<jackPMG.getSampleRate()<<" Hz"<<endl;
42 
43  Window topWindow;
44  topWindow<<(VBox()<<BoxIS(false, true, false)<<(Buttons()<<BUTTONLABELSTRUCT("Quit", quit, NULL)) // add the quit button
45  <<BoxIS(true, true, true)<<jackPMG.HBox::show() // add the jack port manager gui
46  ).show();
47 
48  gtk_main();
49  gdk_threads_leave();
50  return 0;
51 }
Definition: Box.H:351
Definition: Window.H:26
virtual void reSyncPorts(void)
STL namespace.
static void quit(void *wid, gpointer data)
#define BUTTONLABELSTRUCT(s, f, d)
Definition: Buttons.H:73
int main(int argc, char *argv[])
int getSampleRate(void) const
Definition: JackBase.H:266
Class to setup buttons whic are either text, image or toggle types. Buttons are defined in terms of t...
Definition: Buttons.H:184
Definition: Box.H:33
gtkIOStream: /tmp/gtkiostream/applications/JackPortMonitorGui.C Source File
GTK+ IOStream  Beta