Browse Source

Initial time line control added

master
kpl 11 years ago
parent
commit
76ac60f9f3
6 changed files with 107 additions and 383 deletions
  1. 3
    0
      .gitignore
  2. 21
    8
      Makefile.am
  3. 0
    265
      src/kc/Fl_Splitter.cpp
  4. 0
    74
      src/kc/Fl_Splitter.h
  5. 71
    28
      src/kc/kcApp.cpp
  6. 12
    8
      src/kc/kcApp.h

+ 3
- 0
.gitignore View File

@@ -1,5 +1,8 @@
1 1
 # directories to ignore
2 2
 libcm
3
+libgm
4
+libkplfltk
5
+tlCtl
3 6
 
4 7
 .deps
5 8
 autom4te.cache

+ 21
- 8
Makefile.am View File

@@ -11,12 +11,13 @@ include_HEADERS=
11 11
 
12 12
 
13 13
 
14
-AM_CPPFLAGS = -D _GNU_SOURCE  -I.. -I$(srcdir)/src/libcm  -I$(srcdir)/src/libcm/dsp  -I$(srcdir)/src/libcm/vop  -I$(srcdir)/src/libcm/app
15
-AM_CFLAGS   = -Wno-multichar 
16
-AM_CXXFLAGS = 
17
-AM_LDFLAGS  =  
18
-MYLIBS      = -lpthread  -lfftw3f -lfftw3 -lfltk
19
-CMLIBS      = src/libcm/libcm.la  # autoconfig manual recommends storing direct referenes to non-3rd party libraries rather than using -L and -l
14
+AM_CPPFLAGS  = -D _GNU_SOURCE  -I.. -I$(srcdir)/src/libcm  -I$(srcdir)/src/libcm/dsp  -I$(srcdir)/src/libcm/vop  -I$(srcdir)/src/libcm/app
15
+AM_CPPFLAGS +=  -I$(srcdir)/src/libkplfltk -I$(srcdir)/src/libgm -I$(srcdir)/src/tlCtl 
16
+AM_CFLAGS    = -Wno-multichar 
17
+AM_CXXFLAGS  = 
18
+AM_LDFLAGS   =  
19
+MYLIBS       = -lpthread  -lfftw3f -lfftw3 -lfltk -lcairo -lX11
20
+CMLIBS       = src/libcm/libcm.la  src/libgm/libgm.la src/libkplfltk/libkplfltk.la # autoconfig manual recommends storing direct referenes to non-3rd party libraries rather than using -L and -l
20 21
 
21 22
 
22 23
 # debug/release switches
@@ -55,10 +56,22 @@ src_libcm_libcm_la_SOURCES   = $(cmSRC) $(cmHDR)
55 56
 include_HEADERS += $(cmHDR)
56 57
 lib_LTLIBRARIES += src/libcm/libcm.la
57 58
 
59
+include src/libkplfltk/Makefile.am
60
+src_libkplfltk_libkplfltk_la_SOURCES = $(kplfltkSRC) $(kplfltkHDR)
61
+include_HEADERS                     += $(kplfltkHDR)
62
+lib_LTLIBRARIES                     += src/libkplfltk/libkplfltk.la
58 63
 
59
-src_kc_kc_SOURCES  = src/kc/kcMain.cpp 
64
+include src/libgm/Makefile.am
65
+src_libgm_libgm_la_SOURCES  = $(gmSRC) $(gmHDR)
66
+include_HEADERS            += $(gmHDR)
67
+lib_LTLIBRARIES 	   += src/libgm/libgm.la
68
+
69
+include src/tlCtl/Makefile.am
70
+src_kc_kc_SOURCES  = $(tlCtlSRC)
71
+
72
+src_kc_kc_SOURCES += src/kc/kcMain.cpp 
60 73
 src_kc_kc_SOURCES += src/kc/kcApp.h          src/kc/kcApp.cpp 
61
-src_kc_kc_SOURCES += src/kc/Fl_Splitter.h    src/kc/Fl_Splitter.cpp
74
+# src_kc_kc_SOURCES += src/kc/Fl_Splitter.h    src/kc/Fl_Splitter.cpp
62 75
 src_kc_kc_SOURCES += src/kc/Fl_File_Btn.h    src/kc/Fl_Vert_Progress.h
63 76
 src_kc_kc_SOURCES += src/kc/Fl_File_Btn.cpp  src/kc/Fl_Vert_Progress.cpp
64 77
 

+ 0
- 265
src/kc/Fl_Splitter.cpp View File

@@ -1,265 +0,0 @@
1
-// Code based on: http://www.mail-archive.com/fltk@easysw.com/msg04573.html
2
-// Lucas Sanner/Ian MacArthur
3
-#include <stdio.h>
4
-#include "Fl_Splitter.h"
5
-
6
-void Fl_HSplitter::draw()
7
-{
8
-  Fl_Group::draw();
9
-  fl_color(FL_BLACK);
10
-  fl_line_style( FL_DOT, 1);
11
-
12
-  if(bSplit && Fl::event_button1() != 0)
13
-  {
14
-    fl_push_clip(x(), y(), w(), h());
15
-
16
-    yPos = Fl::event_y();
17
-
18
-    if(Fl::event_y() > h() - (border * 2))
19
-      yPos = h() - (border * 2);
20
-
21
-    if(Fl::event_y() < y() + (border * 2))
22
-      yPos = y() + (border * 2);
23
-
24
-    fl_line( x() + border, yPos - 1, x() + w() - (border*2), yPos - 1 );
25
-    fl_line( x() + border, yPos    , x() + w() - (border*2), yPos     );
26
-    fl_line( x() + border, yPos + 1, x() + w() - (border*2), yPos + 1 );
27
-
28
-    /*
29
-    fl_line(
30
-      x() + border,
31
-      yPos,
32
-      x() + w() - (border*2),
33
-      yPos );
34
-
35
-    fl_line(
36
-      x() + border,
37
-      yPos + 1,
38
-      x() + w() - (border*2),
39
-      yPos + 1 );
40
-    */  
41
-
42
-    fl_pop_clip();
43
-  }
44
-  else
45
-  {
46
-    fl_push_clip(x(), y(), w(), h());
47
-    fl_pop_clip();
48
-  }
49
-}
50
-
51
-int Fl_HSplitter::handle(int e)
52
-{
53
-  int ret = Fl_Group::handle(e);
54
-
55
-  switch(e)
56
-  {
57
-    case FL_MOVE:
58
-
59
-      if(Fl::event_y() > hCtnl - border && Fl::event_y() < hCtnl + border)
60
-      {
61
-        fl_cursor(FL_CURSOR_NS);
62
-        bSplit = true;
63
-      }
64
-      else
65
-      {
66
-        fl_cursor(FL_CURSOR_DEFAULT);
67
-        bSplit = false;
68
-      }
69
-
70
-      return 1;
71
-
72
-    case FL_PUSH:
73
-
74
-      if(Fl::event_button() == FL_LEFT_MOUSE && bSplit)
75
-      {
76
-        redraw();
77
-      }
78
-
79
-      return 1;
80
-
81
-    case FL_RELEASE:
82
-
83
-      if(Fl::event_button() == FL_LEFT_MOUSE && bSplit)
84
-      {
85
-        container1->resize(x(), y(), w(), yPos - y());
86
-        hCtnl = yPos;
87
-        container2->resize(x(),hCtnl, w(), h() - (yPos - y()));
88
-        
89
-        if( stretchTopFl )
90
-          init_sizes();
91
-
92
-        bSplit = false;
93
-        redraw();
94
-      }
95
-
96
-      return 1;
97
-
98
-    case FL_DRAG:
99
-
100
-      if(bSplit && Fl::event_state(FL_BUTTON1) != 0)
101
-        redraw();
102
-
103
-      return 1;
104
-  }
105
-
106
-  return(ret);
107
-}
108
-
109
-
110
-Fl_HSplitter::Fl_HSplitter(int x, int y, int w, int h, int h1, const char *l, bool stretchBotFl)
111
-  : Fl_Group(x, y, w, h, l)
112
-{
113
-  int h2 = h - h1;
114
-
115
-  begin();
116
-  container1 = new Splitter_Container(x, y, w, h1);
117
-  //container1->color((Fl_Color) FL_RED);
118
-  end();
119
-
120
-  begin();
121
-  container2 = new Splitter_Container(x, y + h1, w, h2);
122
-  //container2->color((Fl_Color) FL_BLUE);
123
-  end();
124
-
125
-  hCtnl =  y + h1;
126
-  bSplit = false;
127
-  stretchTopFl = !stretchBotFl;
128
-
129
-  border = Fl::box_dy(FL_DOWN_BOX);
130
-
131
-  if( stretchTopFl )
132
-    resizable(container1);
133
-}
134
-
135
-void Fl_HSplitter::resize_splitter(int x, int y, int w, int h)
136
-{
137
-  resize(x, y, w, h);
138
-
139
-  if( stretchTopFl )
140
-  {
141
-    hCtnl = container1->h() + y;
142
-    yPos = hCtnl;
143
-  }
144
-  else
145
-  {
146
-    container1->resize(x, y,     w,     hCtnl - y);
147
-    container2->resize(x, hCtnl, w, h - (hCtnl - y));
148
-  }
149
-
150
-}
151
-
152
-
153
-
154
-void Fl_VSplitter::draw()
155
-{
156
-  Fl_Group::draw();
157
-  fl_color(FL_BLACK);
158
-  fl_line_style( FL_DOT, 1);
159
-
160
-  if(bSplit && Fl::event_button1() != 0)
161
-  {
162
-    fl_push_clip(x(), y(), w(), h());
163
-
164
-    xPos = Fl::event_x();
165
-
166
-    if(Fl::event_x() > w() - (border * 2))
167
-      xPos = w() - (border * 2);
168
-
169
-    if(Fl::event_x() < x() + (border * 2))
170
-      xPos = x() + (border * 2);
171
-
172
-    fl_line(xPos - 1, y() + border, xPos - 1, y() + h() - (border * 2));
173
-    fl_line(xPos, y() + border, xPos, y() + h() - (border * 2));
174
-    fl_line(xPos + 1, y() + border, xPos + 1, y() + h() - (border * 2));
175
-
176
-    fl_pop_clip();
177
-  }
178
-  else
179
-  {
180
-    fl_push_clip(x(), y(), w(), h());
181
-    fl_pop_clip();
182
-  }
183
-}
184
-
185
-int Fl_VSplitter::handle(int e)
186
-{
187
-  int ret = Fl_Group::handle(e);
188
-
189
-  switch(e)
190
-  {
191
-    case FL_MOVE:
192
-
193
-      if(Fl::event_x() > wCtn1 - border && Fl::event_x() < wCtn1 + border)
194
-      {
195
-        fl_cursor(FL_CURSOR_WE);
196
-        bSplit = true;
197
-      }
198
-      else
199
-      {
200
-        fl_cursor(FL_CURSOR_DEFAULT);
201
-        bSplit = false;
202
-      }
203
-
204
-      return 1;
205
-
206
-    case FL_PUSH:
207
-
208
-      if(Fl::event_button() == FL_LEFT_MOUSE && bSplit)
209
-      {
210
-        redraw();
211
-      }
212
-
213
-      return 1;
214
-
215
-    case FL_RELEASE:
216
-
217
-      if(Fl::event_button() == FL_LEFT_MOUSE && bSplit)
218
-      {
219
-        container1->resize(x(), y(), xPos, h());
220
-        wCtn1 = xPos;
221
-        container2->resize(wCtn1, y(), w() - wCtn1, h());
222
-        bSplit = false;
223
-        redraw();
224
-      }
225
-
226
-      return 1;
227
-
228
-    case FL_DRAG:
229
-
230
-      if(bSplit && Fl::event_state(FL_BUTTON1) != 0)
231
-        redraw();
232
-
233
-      return 1;
234
-  }
235
-
236
-  return(ret);
237
-}
238
-
239
-Fl_VSplitter::Fl_VSplitter(int x, int y, int w, int h, const char *l)
240
-  : Fl_Group(x, y, w, h, l)
241
-{
242
-  begin();
243
-  container1 = new Splitter_Container(x, y, w / 2, h);
244
-  //container1->color((Fl_Color) FL_RED);
245
-  end();
246
-
247
-  begin();
248
-  container2 = new Splitter_Container(x + (w / 2), y, w / 2, h);
249
-  //container2->color((Fl_Color) FL_BLUE);
250
-  end();
251
-
252
-  wCtn1 = w / 2;
253
-  bSplit = false;
254
-
255
-  border = Fl::box_dx(FL_DOWN_BOX);
256
-
257
-}
258
-
259
-void Fl_VSplitter::resize_splitter(int x, int y, int w, int h)
260
-{
261
-  resize(x, y, w, h);
262
-  container1->resize(x, y, wCtn1, h);
263
-  container2->resize(wCtn1, y, w - wCtn1, h);
264
-}
265
-

+ 0
- 74
src/kc/Fl_Splitter.h View File

@@ -1,74 +0,0 @@
1
-// Code based on: http://www.mail-archive.com/fltk@easysw.com/msg04573.html
2
-// Lucas Sanner/Ian MacArthur
3
-
4
-#ifndef Fl_Splitter_h
5
-#define Fl_Splitter_h
6
-
7
-#include <FL/Fl.H>
8
-#include <FL/Fl_Group.H>
9
-#include <FL/Fl_Box.H>
10
-#include <FL/fl_draw.H>
11
-
12
-
13
-class Splitter_Container : public Fl_Group
14
-{
15
-  void draw()
16
-  {
17
-    fl_push_clip(x(), y(), w(), h());
18
-    Fl_Group::draw();
19
-    fl_pop_clip();
20
-  }
21
-
22
-  public:
23
-
24
-    Splitter_Container(int x, int y, int w, int h, char *l = NULL)
25
-    : Fl_Group(x, y, w, h, l)
26
-    {
27
-      //box(FL_DOWN_BOX);
28
-    }
29
-};
30
-
31
-class Fl_HSplitter : public Fl_Group
32
-{
33
-  int hCtnl, border, yPos;
34
-  bool bSplit;
35
-  bool stretchTopFl;  // set to make top container stretch when splitter is resized
36
-  int  hh2;
37
-
38
-  void draw();
39
-
40
-  int handle(int e);
41
-
42
-  public:
43
-
44
-  Splitter_Container *container1, *container2;
45
-
46
-  Fl_HSplitter(int x, int y, int w, int h, int h1, const char *l=NULL, bool stretchBotFl=false);
47
-
48
-  void resize_splitter(int x, int y, int w, int h);
49
-
50
-};
51
-
52
-
53
-class Fl_VSplitter : public Fl_Group
54
-{
55
-
56
-  int wCtn1, border, xPos;
57
-  bool bSplit;
58
-
59
-  void draw();
60
-  int handle(int e);
61
-
62
-  public:
63
-
64
-  Splitter_Container *container1, *container2;
65
-
66
-  Fl_VSplitter(int x, int y, int w, int h, const char *l = NULL);
67
-
68
-  void resize_splitter(int x, int y, int w, int h);
69
-
70
-
71
-
72
-};
73
-
74
-#endif

+ 71
- 28
src/kc/kcApp.cpp View File

@@ -42,14 +42,38 @@
42 42
 #include "cmAudDspLocal.h"
43 43
 #include "kcApp.h"
44 44
 
45
-#include "kcApp.h"
45
+#include "cmAudioFile.h"
46
+#include "cmAudioFileMgr.h"
47
+
48
+#include "cmMidi.h"
49
+#include "cmMidiFile.h"
50
+#include "cmTimeLine.h"
51
+#include "cmScore.h"
52
+#include "cmGr.h"
53
+#include "cmGrDevCtx.h"
54
+#include "cmGrPlot.h"
55
+#include "cmGrPage.h"
56
+#include "cmGrDevDrvFltk.h"
57
+#include "cmGrDevDrvCairoFltk.h"
58
+#include "cmGrWidgetFltk.h"
59
+
60
+#include "Fl_CbLinker.h"
61
+
62
+#include "cmGrPlotPageFltk.h"
63
+#include "cmGrPlotCtlrFltk.h"
64
+#include "gvHashFunc.h"
65
+#include "cmGrTlCtlrFltk.h"
66
+#include "cmGrScCtlrFltk.h"
67
+
68
+#include "cmdIf.h"
69
+#include "tlCtl.h"
46 70
 
47 71
 #define TIMER_PERIOD (1.0/20.0)   // 50ms
48 72
 
49 73
 
50 74
 kcApp::kcApp(int w, int h, const char *l, int argc, char *argv[])
51 75
   : Fl_Double_Window(w, h, l),
52
-    menu(NULL),splt(NULL),
76
+    splt(NULL),_menu(NULL),
53 77
     _adlH(cmAdlNullHandle),_aiH(cmAiNullHandle),
54 78
     _statIdx(0),_pageList(NULL),_ctlList(NULL),_prH(cmPrNullHandle),_prefsFn(NULL),
55 79
     _stopTimerFl(false),_jsH(cmJsonNullHandle),_newPageFl(true),_incrColW(0),_colW(0),_horzBordFl(false),_horzBord(0),
@@ -62,7 +86,8 @@ kcApp::kcApp(int w, int h, const char *l, int argc, char *argv[])
62 86
   // the main window is divided between the menu bar on top
63 87
   // and a horizontal splitter on the bottom
64 88
   begin();
65
-  splt = new Fl_HSplitter(0, 0, w, h-kStatusH, h-kStatusH-100);
89
+  _createMenu(w,kMenuH);
90
+  splt = new Fl_HSplitter(0, kMenuH, w, h-kStatusH-kMenuH, h-kStatusH-kMenuH-100);
66 91
   end();
67 92
 
68 93
   // Create a text display object for console output and
@@ -99,8 +124,7 @@ kcApp::kcApp(int w, int h, const char *l, int argc, char *argv[])
99 124
   ctl_grp->begin();
100 125
   Fl_Box* bx = new Fl_Box(FL_NO_BOX,ctl_grp->x()+ctl_grp->w(),ctl_grp->y()+ctl_grp->h(),1,1,NULL);
101 126
   ctl_grp->resizable(bx); 
102
-  ctl_grp->end();
103
-  tabs->end();
127
+  ctl_grp->end();  tabs->end();
104 128
   */
105 129
 
106 130
   // Create an empty tab group and make it resizable 
@@ -243,7 +267,7 @@ kcApp::kcKmRC_t kcApp::audioDspFinalize()
243 267
 void kcApp::resize(int x, int y, int w, int h)
244 268
 {
245 269
   Fl_Double_Window::resize(x, y, w, h);
246
-  splt->resize_splitter(0, 0, w, h-kStatusH);
270
+  splt->resize(0, kMenuH, w, h-kStatusH);
247 271
 }
248 272
 
249 273
 
@@ -303,7 +327,7 @@ void kcApp::_createSetupDlg( Fl_Group* grp )
303 327
   grp->end();
304 328
 }
305 329
 
306
-/*
330
+
307 331
 void kcApp::_createMenu(int w, int h)
308 332
 {
309 333
   Fl_Menu_Item items[] =
@@ -319,12 +343,11 @@ void kcApp::_createMenu(int w, int h)
319 343
     { 0 }
320 344
   };
321 345
 
322
-  menu = new Fl_Menu_Bar(0,0,w,h);
323
-  menu->copy(items);
346
+  _menu = new Fl_Menu_Bar(0,0,w,h);
347
+  _menu->copy(items);
324 348
 }
325
-*/
326 349
 
327
-  void  kcApp::_createPage( const char* title )
350
+void  kcApp::_createPage( const char* title )
328 351
 {
329 352
   int tx,ty,th,tw;
330 353
   tabs->client_area(tx,ty,tw,th);
@@ -564,7 +587,7 @@ void kcApp::_getNewCtlPosn( const cmDspUiHdr_t* m, int& x, int& y, int& w, int&
564 587
   }
565 588
 }
566 589
 
567
-kcApp::ctl_t* kcApp::_createCtl( const cmDspUiHdr_t* m, unsigned typeId, int& x, int& y, int& w, int& h )
590
+kcApp::ctl_t* kcApp::_createCtl( const cmDspUiHdr_t* m, unsigned typeId, int& x, int& y, int& w, int& h, bool posnFl )
568 591
 {
569 592
   ctl_t* cp = new ctl_t;
570 593
 
@@ -574,7 +597,8 @@ kcApp::ctl_t* kcApp::_createCtl( const cmDspUiHdr_t* m, unsigned typeId, int& x,
574 597
   cp->typeId      = typeId;
575 598
   cp->mstrFl      = m->uiId == cmInvalidId;
576 599
 
577
-  _getNewCtlPosn(m,x,y,w,h);
600
+  if( posnFl )
601
+    _getNewCtlPosn(m,x,y,w,h);
578 602
 
579 603
   return cp;
580 604
 }
@@ -1187,17 +1211,19 @@ void kcApp::_setLabelValue( ctl_t* cp, unsigned instVarId, const cmDspValue_t* v
1187 1211
 void kcApp::_createTmln(  const cmDspUiHdr_t* m )
1188 1212
 {
1189 1213
   int x,y,w=0,h=0;
1190
-  ctl_t* cp = _createCtl(m, kTmlnTypeId, x,y,w,h );
1214
+  ctl_t* cp = _createCtl(m, kTmlnTypeId, x,y,w,h, false );
1191 1215
 
1192
-  cp->u.tmln.text = new Fl_Input(x,y,w,h);
1216
+  cp->u.tmln.tlctl = new tlCtl(&_ctx,NULL);
1193 1217
 
1194
-  _insertNewCtl(cp, m, cp->u.tmln.text, cp->u.tmln.varIdArray, kTmlnVarCnt );  
1218
+  _createPage("TimeLine");
1219
+
1220
+  cp->u.tmln.tlctl->initScoreCtlr(this, _pageList->grp, _menu );
1195 1221
 }
1196 1222
 
1197 1223
 void kcApp::_setTmlnValue( ctl_t* cp, unsigned instVarId, const cmDspValue_t* vp )
1198 1224
 {
1199 1225
   unsigned i=0;
1200
-  Fl_Input* tp = cp->u.tmln.text;
1226
+  //tlCtl* tp = cp->u.tmln.tlctl;
1201 1227
 
1202 1228
   for(i=0; i<kTmlnVarCnt; ++i)
1203 1229
     if( cp->u.tmln.varIdArray[i] == instVarId )
@@ -1205,21 +1231,34 @@ void kcApp::_setTmlnValue( ctl_t* cp, unsigned instVarId, const cmDspValue_t* vp
1205 1231
       switch(i)
1206 1232
       {
1207 1233
         case kTmlnValArgIdx:
1208
-          tp->value( cmDsvStrcz(vp));
1234
+          //tp->value( cmDsvStrcz(vp));
1209 1235
           break;
1210 1236
 
1211 1237
         case kTmlnLblArgIdx:
1212 1238
           {
1213 1239
             const char* lbl = cmDsvStrcz(vp);
1214
-            if( lbl == NULL )
1215
-              tp->label(NULL);
1216
-            else
1217
-              tp->copy_label( lbl );
1240
+          }
1241
+          break;
1218 1242
 
1219
-            tp->align(FL_ALIGN_RIGHT);
1220
-            tp->resize( tp->x(), tp->y(), tp->w()/2, tp->h());
1221
-            tp->redraw();
1222
-            
1243
+        case kTmlnFileArgIdx:
1244
+          {
1245
+            const char* fn;
1246
+            if((fn = cmDsvStrcz(vp)) != NULL )
1247
+            {
1248
+              cp->u.tmln.tlctl->openTlFile(fn);
1249
+              //cp->u.tmln.tlctl->redraw();
1250
+            }
1251
+          }
1252
+          break;
1253
+
1254
+        case kTmlnPathArgIdx:
1255
+          {
1256
+            const char* path;
1257
+            if((path = cmDsvStrcz(vp)) != NULL )
1258
+            {
1259
+              cp->u.tmln.tlctl->setAudioFilePath(path);
1260
+              //cp->u.tmln.tlctl->redraw();
1261
+            }
1223 1262
           }
1224 1263
           break;
1225 1264
 
@@ -1860,6 +1899,10 @@ void kcApp::_callback(void* data)
1860 1899
       return;
1861 1900
     }
1862 1901
 
1902
+    ctl_t* cp = _ctlList;
1903
+    for(; cp!=NULL; cp=cp->linkPtr)
1904
+      if( cp->typeId == kTmlnTypeId )
1905
+        delete cp->u.tmln.tlctl;
1863 1906
 
1864 1907
     // When all windows are windows are closed then the app.
1865 1908
     // will close - so hiding the application window
@@ -2076,8 +2119,8 @@ void kcApp::_ctl_cb(ctl_t* cp)
2076 2119
       break;
2077 2120
 
2078 2121
     case kTmlnTypeId:
2079
-      instVarId = cp->u.text.varIdArray[ kTmlnValArgIdx ];
2080
-      cmDsvSetStrz(&value,(cmChar_t*)cp->u.tmln.text->value());
2122
+      //instVarId = cp->u.text.varIdArray[ kTmlnValArgIdx ];
2123
+      //cmDsvSetStrz(&value,(cmChar_t*)cp->u.tmln.text->value());
2081 2124
       break;
2082 2125
 
2083 2126
     default:

+ 12
- 8
src/kc/kcApp.h View File

@@ -17,6 +17,7 @@ class Fl_Select_Browser;
17 17
 class Fl_Valuator;
18 18
 class Fl_Value_Input;
19 19
 class Fl_Progress;
20
+class tlCtl;
20 21
 
21 22
 class kcApp : public Fl_Double_Window
22 23
 {
@@ -64,7 +65,7 @@ private:
64 65
     kSsPhaseMax = 20
65 66
   };
66 67
 
67
-  Fl_Menu_Bar*     menu;
68
+  //Fl_Menu_Bar*     menu;
68 69
   Fl_HSplitter*    splt;
69 70
   Fl_Box*          ind[4];
70 71
   Fl_Text_Buffer*  buf;
@@ -138,7 +139,9 @@ private:
138 139
 
139 140
     kTmlnValArgIdx = 0,
140 141
     kTmlnLblArgIdx = 1,
141
-    kTmlnVarCnt    = 2
142
+    kTmlnFileArgIdx= 2,
143
+    kTmlnPathArgIdx= 3,
144
+    kTmlnVarCnt    = 4
142 145
 
143 146
   }; 
144 147
 
@@ -223,7 +226,7 @@ private:
223 226
 
224 227
   typedef struct tmln_str
225 228
   {
226
-    Fl_Input* text;
229
+    tlCtl*     tlctl;
227 230
     char*      val;
228 231
     unsigned   varIdArray[ kTmlnVarCnt ];
229 232
   } tmln_t;
@@ -278,6 +281,7 @@ private:
278 281
 
279 282
 
280 283
   cmCtx_t         _ctx;
284
+  Fl_Menu_Bar*    _menu;
281 285
   cmAdlH_t        _adlH;
282 286
   cmAiH_t         _aiH;
283 287
   unsigned        _statIdx;
@@ -288,9 +292,9 @@ private:
288 292
   const cmChar_t* _prefsFn;
289 293
   bool            _stopTimerFl;
290 294
   cmJsonH_t       _jsH;
291
-  bool             _newPageFl;
292
-  unsigned         _incrColW;
293
-  unsigned         _colW;
295
+  bool            _newPageFl;
296
+  unsigned        _incrColW;
297
+  unsigned        _colW;
294 298
   bool            _horzBordFl;
295 299
   unsigned        _horzBord;
296 300
   unsigned        _closeCnt;
@@ -303,7 +307,7 @@ private:
303 307
   void resize(int x, int y, int w, int h);
304 308
 
305 309
   void          _createSetupDlg(Fl_Group* grp);
306
-
310
+  void          _createMenu( int w, int h );
307 311
   void          _createPage( const char* title );
308 312
 
309 313
   unsigned      _getCtlCount() const;
@@ -311,7 +315,7 @@ private:
311 315
   void          _clearSsArray();
312 316
   void          _getNewCtlPosn( const cmDspUiHdr_t* m, int& x, int& y, int& w, int& h );
313 317
   ctl_t*        _findCtl( unsigned instId, unsigned asSubIdx, unsigned mstrFl=false );
314
-  ctl_t*        _createCtl( const cmDspUiHdr_t* m, unsigned typeId, int& x, int& y, int& w, int& h );
318
+  ctl_t*        _createCtl( const cmDspUiHdr_t* m, unsigned typeId, int& x, int& y, int& w, int& h, bool posnFl=true );
315 319
   void          _insertNewCtl( ctl_t* cp, const cmDspUiHdr_t* m, Fl_Widget* wdgt, unsigned* varIdArray, unsigned varIdCnt );
316 320
 
317 321
   void          _createSlider(  const cmDspUiHdr_t* m );

Loading…
Cancel
Save