head	1.6;
access;
symbols
	rel-0-2-1:1.4
	before_adj_struct:1.3.2.2
	jack:1.3.0.2
	rel-0-1-0:1.2
	rel-0-0-0:1.1;
locks; strict;
comment	@ * @;


1.6
date	2007.03.22.20.55.43;	author robertatwood;	state Exp;
branches;
next	1.5;

1.5
date	2006.04.23.22.03.14;	author robertatwood;	state Exp;
branches;
next	1.4;

1.4
date	2006.04.05.21.53.36;	author robertatwood;	state Exp;
branches;
next	1.3;

1.3
date	2005.08.20.18.26.42;	author robertatwood;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2005.04.03.20.05.38;	author robertatwood;	state Exp;
branches;
next	1.1;

1.1
date	2004.04.16.11.36.56;	author robertatwood;	state Exp;
branches;
next	;

1.3.2.1
date	2005.12.28.18.17.00;	author robertatwood;	state Exp;
branches;
next	1.3.2.2;

1.3.2.2
date	2006.01.04.00.06.03;	author robertatwood;	state Exp;
branches;
next	1.3.2.3;

1.3.2.3
date	2006.01.04.00.41.58;	author robertatwood;	state Exp;
branches;
next	1.3.2.4;

1.3.2.4
date	2006.04.05.21.42.24;	author robertatwood;	state Exp;
branches;
next	;


desc
@@


1.6
log
@Updated GPL text to reflect new address of Free Software foundation
Prepare to move repository to savannah.nongnu.org
@
text
@/**************************************************************
This file is part of the Variseq program.
Variseq -- a variable pitch and step sample sequencer
Copyright (C) 2004  Robert Atwood r.atwood (at) imperial (dot) ac (dot) uk

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 
See the file COPYING for more information
**************************************************************/


/* INclude all the required fltk object headers */

#ifndef MYFL_H
#define MYFL_H
#include <Fl/Fl.h>
#include <Fl/Fl_Window.h>
#include <Fl/Fl_Scroll.h>
#include <Fl/Fl_Box.h>
#include <Fl/Fl_Value_Slider.h>
#include <Fl/Fl_Slider.h>
#include <FL/Fl_File_Chooser.H>
#include <FL/Fl_Menu_Bar.H>
#include <Fl/Fl_Light_Button.h>
#include <Fl/Fl_Round_Button.h>
#include <Fl/Fl_Roller.h>
#include <Fl/Fl_Value_Input.h>
#include <Fl/Fl_Dial.h>
#include <Fl/Fl_Group.h>
#include <Fl/Fl_Toggle_Button.h>
#include <FL/fl_draw.H>
#include <FL/Fl_Multiline_Output.H>
#include <FL/Fl_Output.H>


/* define some parameters for the geometry of the interface window */
#define SWIDTH 20
#define SSPACE 10
#define MARGIN 10 
#define RCTRLS 50
#ifdef COMPACT
   #define SHEIGHT SWIDTH
#else
   #define SHEIGHT 110
#endif
#define TOP 20
#define SLABEL 15
#define MENU 30
#define NAMEWIDTH 70

/* make a class for a fltk derived */
/* button with its own number */
class mybt: public Fl_Light_Button {
public:
   mybt(int x,int y, int w, int h, const char * label);
   int my_num;
   int my_func;
   void * o_handle;
   void sethandle(void * hdl){o_handle=hdl; };
   int mynum(){ return my_num; };
   int mynum(int num){my_num = num; selection_color(my_num); return(my_num);};
   int myfunc(){ return my_func; };
   int myfunc(int func){my_func = func; return(my_func);};

};

/* here, some classes are derived to enable the use of event handlers */
/* with these gui elements */

/** \todo Unify my slider types into one, with separate callbacks */
/* to choose the function! */
/* slider for length value with its event handler */
/* to allow update only on mouse release or keyboard key-up  events */
class slenval:public Fl_Slider {
public:
   slenval(int x, int y, int w, int h, const char * label);
   int handle(int event);
   /* handler routine located in callbacks.C*/
   /* to access global pattern variable */
};

/* slider for octave value with its event handler */
/* to allow update only on mouse release or keyboard key-up  events */
class soct:public Fl_Slider {
public:
   soct(int x, int y, int w, int h, const char * label);
   int handle(int event);
   /* handler routine located in callbacks.C*/
   /* to access global pattern variable */
};

class stype:public Fl_Slider {
public:
   stype(int x, int y, int w, int h, const char * label);
   int handle(int event);
   /* handler routine located in callbacks.C*/
   /* to access global pattern variable */
};

/* group of widgets to control each individual note attributes */
class ctrl : public Fl_Group{
   public:
   ctrl(int x , int y , int w, int h, const char * label);
   mybt sampbut;
   char * myname;
   Fl_Dial pan;
   Fl_Slider clip;
   Fl_Slider vol;
   #ifdef COMPACT
   Fl_Value_Input note;
   #else
   Fl_Value_Slider note;
   #endif
   soct oct;
   slenval nlen;
   int my_num;

   int mynum(int newnum){my_num=newnum;return my_num;};
   int mynum(){return my_num;};
   #ifdef COMPACT
   void setlevels(int nlevels){note.maximum(nlevels);};
   #else
   void setlevels(int nlevels){note.minimum(nlevels);};
   #endif

   void notelabel(char * name){note.label(name);};
   void button_color(int  c){sampbut.selection_color(c);};
   void draw(){ pan.redraw(); Fl_Group::draw();};
   void redraw(){ pan.redraw(); Fl_Group::redraw();};

};
class sampctrl:public Fl_Group{
   public:
   sampctrl(int x, int y, int w, int h, const char * label);
   int my_num;
   mybt nlbt,nibt,nbbt;
   Fl_Output sampname;
   Fl_Value_Input bars;
   stype type;
   mybt apbt;
   int mynum(int newnum);
   int mynum(){return my_num;};
   //void scallback( void(* func)(Fl_Widget *w, void *d));
   void scallback(void (&func)(Fl_Widget*, void*), int*& data);
};
#ifdef JUNK
/* need to prevent rewriting while pwin is open */
/* put the lock into the show function */
class popwin::public Fl_Window{
 public:
 popwin(int x, int y, int w, int h, const char * label);
 show();
 hide();
};
#endif



#endif
/* $Id: myFl.h,v 1.5 2006/04/23 22:03:14 robertatwood Exp $ */
@


1.5
log
@Fixed popup window location and sample name label
@
text
@d18 1
a18 1
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d22 3
d47 1
d62 1
d77 5
a81 1
/** \todo Unify my slider types into one, with separate callbacks /
d171 1
a171 1
/* $Id: myFl.h,v 1.4 2006/04/05 21:53:36 robertatwood Exp $ */
@


1.4
log
@Jack version is the main branch now
@
text
@d48 5
a52 1
#define SHEIGHT 110
d111 3
d115 1
d122 3
d126 2
d162 1
a162 1
/* $Id: myFl.h,v 1.3.2.4 2006/04/05 21:42:24 robertatwood Exp $ */
@


1.3
log
@Added a save/restore workspace function
Added window to display names of samples
@
text
@d26 1
d52 1
d59 3
d63 4
a66 1
   int mynum(int num){my_num = num; return(my_num);};
d68 2
a69 1

d90 8
d103 1
d117 2
d121 27
d149 1
a149 1
/* $Id: myFl.h,v 1.2 2005/04/03 19:05:10 robert Exp $ */
@


1.3.2.1
log
@Appears to work but needs file name placed in the textbox after replacement
@
text
@a56 2
   void * o_handle;
   void sethandle(void * h){o_handle=h; };
a58 1

d102 1
a102 1
/* $Id: myFl.h,v 1.3 2005/08/20 18:26:42 robertatwood Exp $ */
@


1.3.2.2
log
@Jack input as well, and scrambling in compile-time option
@
text
@a50 1
#define NAMEWIDTH 70
a56 1
   int my_func;
d58 1
a58 1
   void sethandle(void * hdl){o_handle=hdl; };
d60 1
a60 3
   int mynum(int num){my_num = num; selection_color(my_num); return(my_num);};
   int myfunc(){ return my_func; };
   int myfunc(int func){my_func = func; return(my_func);};
a103 27
class sampctrl:public Fl_Group{
   public:
   sampctrl(int x, int y, int w, int h, const char * label);
   int my_num;
   mybt nlbt,nibt,nbbt;
   Fl_Output sampname;
   Fl_Value_Input bars;
   Fl_Slider type;
   mybt apbt;
   int mynum(int newnum);
   int mynum(){return my_num;};
   //void scallback( void(* func)(Fl_Widget *w, void *d));
   void scallback(void (&func)(Fl_Widget*, void*), int*& data);
};
#ifdef JUNK
/* need to prevent rewriting while pwin is open */
/* put the lock into the show function */
class popwin::public Fl_Window{
 public:
 popwin(int x, int y, int w, int h, const char * label);
 show();
 hide();
};
#endif



d105 1
a105 1
/* $Id: myFl.h,v 1.3.2.1 2005/12/28 18:17:00 robertatwood Exp $ */
@


1.3.2.3
log
@Before adding the adjustment structure into the sampel table
@
text
@d67 1
a67 2
/** \todo Unify my slider types into one, with separate callbacks /
/* to choose the function! */
a87 8
class stype:public Fl_Slider {
public:
   stype(int x, int y, int w, int h, const char * label);
   int handle(int event);
   /* handler routine located in callbacks.C*/
   /* to access global pattern variable */
};

d115 1
a115 1
   stype type;
d136 1
a136 1
/* $Id: myFl.h,v 1.3.2.2 2006/01/04 00:06:03 robertatwood Exp $ */
@


1.3.2.4
log
@Jack or portaudio version with compile-time selection
Autoscramblizer option , input option
@
text
@a25 1
#include <Fl/Fl_Scroll.h>
a101 1
   char * myname;
a114 2
   void draw(){ pan.redraw(); Fl_Group::draw();};
   void redraw(){ pan.redraw(); Fl_Group::redraw();};
d145 1
a145 1
/* $Id: myFl.h,v 1.3.2.3 2006/01/04 00:41:58 robertatwood Exp $ */
@


1.2
log
@Changed the buffer writing so that samples extend into unused notes.
Altered file choose usage to correctly use the FLTK chooser
@
text
@@


1.1
log
@Initial version uploaded to Sourceforge
@
text
@d32 1
d102 1
a102 1
/* $Id: myFl.h,v 1.8 2004/04/12 13:22:33 robert Exp $ */
@

