I have modified FvwmTaskBar to allow for Windows-like shortcut minibuttons in the taskbar. These can have icons, textlabels, or a combination of both. A screenshot can be seen at http://www.students.uiuc.edu/~blmathew/fvwm.png that shows an example of all three types of buttons, to the immediate right of the start button. There is a text label for Mozilla, an icon for xterm, and a combination for Freeamp. The screenshot may be unavailable in a matter of days, as I am about to lose my uiuc account.

The syntax for this command is as follows:
*FvwmTaskBar: Button Action <action>, Title <title>, Icon <icon>

The buttons MUST be declared AFTER the start button. Doing so before will cause unpredictable behaviour. I am working on this now. The will appear in order from left to right as they are declared in fvwm2rc.

The action, title, and icon can appear in any order. The commands to get the three minibuttons on my screenshot are shown on the screenshot and below:

*FvwmTaskBar: Button Action exec exec /usr/local/mozilla/mozilla, Title Mozilla
*FvwmTaskBar: Button Icon mini.term.xpm, Action exec exec xterm
*FvwmTaskBar: Button Icon mini.cd.xpm, Action exec exec freeamp, Title Freeamp

I origionally wrote this against 2.4.9, under which I have been using it with no problems for the last month. I re-wrote it against the current CVS code, which also appears to be working fine. My origional change to 2.4.9 also allowed more control over the spacing of the buttons as well as an option to not have the start button. I will add these within the comming days.

Let me know what you guys think.

Ben Mathews

? patchfile
Index: ButtonArray.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmTaskBar/ButtonArray.c,v
retrieving revision 1.31
diff -u -r1.31 ButtonArray.c
--- ButtonArray.c       2002/08/30 06:04:02     1.31
+++ ButtonArray.c       2002/09/08 04:18:13
@@ -680,7 +680,7 @@
 /* -------------------------------------------------------------------------
     ButtonCoordinates - Compute the coordinates of a button (animation)
    ------------------------------------------------------------------------- */
-extern int StartButtonWidth;
+extern int  StartAndMiniButtonsWidth;
 void ButtonCoordinates(ButtonArray *array, int numbut, int *xc, int *yc)
 {
        Button *temp;
@@ -702,7 +702,7 @@
                }
        }
 
-       *xc = x+StartButtonWidth+3;
+       *xc = x+ StartAndMiniButtonsWidth+3;
        *yc = y;
 }
 
Index: FvwmTaskBar.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmTaskBar/FvwmTaskBar.c,v
retrieving revision 1.102
diff -u -r1.102 FvwmTaskBar.c
--- FvwmTaskBar.c       2002/09/03 23:13:08     1.102
+++ FvwmTaskBar.c       2002/09/08 04:18:17
@@ -14,6 +14,9 @@
  * Merciless hack by RBW for the Great Style Flag Rewrite - 04/20/1999.
  * Now the GSFR is used and there are no other flags (olicha may 19, 2000).
  *
+ * Modified Start.c and FvwmTaskBar.c to allow for Windows-like minibuttons
+ * in the taskbar (Ben Mathews, 9/7/2002)
+ *
  * The author makes not guarantees or warantees, either express or
  * implied.  Feel free to use any code contained here for any purpose, as long
  * and this and any other applicable copyrights are kept intact.
@@ -170,6 +173,9 @@
 
 int UpdateInterval = 30;
 
+int whichButton = -1; 
+Bool startButtonPressed = FALSE;
+
 ButtonArray buttons;
 List windows;
 
@@ -226,9 +232,9 @@
 extern TipStruct Tip;
 
 /* Imported from Start */
-extern int StartButtonWidth, StartButtonHeight;
-extern char *StartPopup;
-extern char *StartCommand;
+extern int StartAndMiniButtonsWidth, StartAndMiniButtonsHeight;
+extern StartAndMiniButtonItem *First_Start_Button;
+extern StartAndMiniButtonItem *Last_Start_Button;
 
 char *ImagePath = NULL;
 char *XineramaConfig = NULL;
@@ -360,8 +366,8 @@
   StartButtonInit(RowHeight);
 
   /* init the array of buttons */
-  InitArray(&buttons, StartButtonWidth + 4, 0,
-                     win_width - stwin_width - 8 - StartButtonWidth -10,
+  InitArray(&buttons, StartAndMiniButtonsWidth + 4, 0,
+                     win_width - stwin_width - 8 - StartAndMiniButtonsWidth 
-10,
                      RowHeight, button_width);
   InitList(&windows);
 
@@ -559,7 +565,7 @@
          XResizeWindow(dpy, win, win_width, win_height);
 
        UpdateArray(&buttons, -1, -1,
-                   win_width - stwin_width - 8 - StartButtonWidth -10,-1, -1);
+                   win_width - stwin_width - 8 - StartAndMiniButtonsWidth 
-10,-1, -1);
        ArrangeButtonArray (&buttons);
       }
       if (AutoStick && win_is_shaded != IS_SHADED(cfgpacket))
@@ -1274,7 +1280,7 @@
   int  num, bx, by, trunc;
   char *name;
 
-  if (MouseInStartButton(x, y)) {
+  if (MouseInStartButton(x, y, &whichButton, &startButtonPressed)) {
     if (Tip.type != START_TIP) PopupTipWindow(3, 0, "Click here to start");
     Tip.type = START_TIP;
   }
@@ -1338,9 +1344,10 @@
     case ButtonRelease:
       NewTimestamp = Event.xbutton.time;
       num = WhichButton(&buttons, Event.xbutton.x, Event.xbutton.y);
+      StartButtonUpdate(NULL, -1, BUTTON_UP);
       if (num == -1) {
-       if (MouseInStartButton(Event.xbutton.x, Event.xbutton.y))
-         StartButtonUpdate(NULL, BUTTON_UP);
+       if (MouseInStartButton(Event.xbutton.x, Event.xbutton.y, &whichButton, 
&startButtonPressed))
+         StartButtonUpdate(NULL, whichButton, BUTTON_UP);
       } else {
        ButReleased = ButPressed; /* Avoid race fvwm pipe */
        if (Event.xbutton.button >= 1 &&
@@ -1369,8 +1376,8 @@
        }
       }
 
-      if (MouseInStartButton(Event.xbutton.x, Event.xbutton.y)) {
-       StartButtonUpdate(NULL, BUTTON_UP);
+      if (MouseInStartButton(Event.xbutton.x, Event.xbutton.y, &whichButton, 
&startButtonPressed)) {
+       StartButtonUpdate(NULL, whichButton, BUTTON_UP);
        redraw = 0;
        usleep(50000);
       }
@@ -1387,8 +1394,8 @@
     case ButtonPress:
       NewTimestamp = Event.xbutton.time;
       RadioButton(&buttons, -1, BUTTON_UP); /* no windows focused anymore */
-      if (MouseInStartButton(Event.xbutton.x, Event.xbutton.y)) {
-       StartButtonUpdate(NULL, BUTTON_DOWN);
+      if (MouseInStartButton(Event.xbutton.x, Event.xbutton.y, &whichButton, 
&startButtonPressed)) {
+       StartButtonUpdate(NULL, whichButton, BUTTON_DOWN);
        x = win_x;
        if (win_y < Midline) {
          /* bar in top half of the screen */
@@ -1397,17 +1404,17 @@
          /* bar in bottom of the screen */
          y = win_y - screen_g.height;
        }
-       if (StartCommand != NULL)
+       if ((strlen(First_Start_Button->buttonStartCommand) != 0) && 
(startButtonPressed))
        {
          rectangle r;
          Window tmpw;
-
          r.x = 0;
          r.y = 0;
-         r.width = StartButtonWidth;
-         r.height = StartButtonHeight;
+         r.width = StartAndMiniButtonsWidth;
+         r.height = StartAndMiniButtonsHeight;
          XTranslateCoordinates(dpy, win, Root, r.x, r.y, &r.x, &r.y, &tmpw);
-         tmp = module_expand_action(dpy, screen, StartCommand, &r, NULL, NULL);
+         tmp = module_expand_action(dpy, screen, 
First_Start_Button->buttonStartCommand, &r, NULL, NULL);  // this section needs 
to be fixed, get rid of StartCommand variable
+
          if (tmp)
          {
            SendText(Fvwm_fd, tmp, 0);
@@ -1415,22 +1422,20 @@
          }
          else
          {
-           SendText(Fvwm_fd, StartCommand, 0);
+           SendText(Fvwm_fd, First_Start_Button->buttonStartCommand, 0);
          }
        }
-       if (StartPopup != NULL)
+       else
        {
-         tmp = (char *)safemalloc(strlen(StartPopup) + 7);
-         sprintf(tmp,"Popup %s", StartPopup);
+         tmp = (char *)safemalloc(50 * sizeof(char));  // fix this later
+         getButtonCommand(whichButton, tmp);
          SendText(Fvwm_fd, tmp, 0);
          free(tmp);
        }
-       if (StartPopup == NULL && StartCommand == NULL)
-       {
-         SendText(Fvwm_fd, "Popup StartMenu", 0);
-       }
+
+
       } else {
-       StartButtonUpdate(NULL, BUTTON_UP);
+       StartButtonUpdate(NULL, whichButton, BUTTON_UP);
        if (MouseInMail(Event.xbutton.x, Event.xbutton.y)) {
          HandleMailClick(Event);
        } else {
@@ -1522,13 +1527,13 @@
 
     case MotionNotify:
       NewTimestamp = Event.xmotion.time;
-      if (MouseInStartButton(Event.xmotion.x, Event.xbutton.y)) {
+      if (MouseInStartButton(Event.xmotion.x, Event.xbutton.y, &whichButton, 
&startButtonPressed)) {
        if (SomeButtonDown(Event.xmotion.state))
-         redraw = StartButtonUpdate(NULL, BUTTON_DOWN) ? 0 : -1;
+         redraw = StartButtonUpdate(NULL, -1, BUTTON_DOWN) ? 0 : -1;
        CheckForTip(Event.xmotion.x, Event.xmotion.y);
        break;
       }
-      redraw = StartButtonUpdate(NULL, BUTTON_UP) ? 0 : -1;
+      redraw = StartButtonUpdate(NULL, -1, BUTTON_UP) ? 0 : -1;
       num = WhichButton(&buttons, Event.xmotion.x, Event.xmotion.y);
       if (!HighlightFocus) {
        if (SomeButtonDown(Event.xmotion.state) && num != ButPressed) {
Index: Start.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmTaskBar/Start.c,v
retrieving revision 1.16
diff -u -r1.16 Start.c
--- Start.c     2002/08/11 08:17:19     1.16
+++ Start.c     2002/09/08 04:18:18
@@ -14,14 +14,19 @@
  */
 
 /* Start ;-) button handling */
+/* Modified Start.c and FvwmTaskBar.c to allow for Windows-like minibuttons
+ * in the taskbar (Ben Mathews, 9/7/2002)
+ */
 
 #include <X11/Xlib.h>
+#include <stdio.h>
 
 #include "libs/fvwmlib.h"
 #include "libs/Flocale.h"
 #include "libs/Picture.h"
 #include "ButtonArray.h"
 #include "Mallocs.h"
+#include "Start.h"
 
 extern Display *dpy;
 extern Window Root, win;
@@ -31,12 +36,15 @@
 extern int ColorLimit;
 
 Button *StartButton;
-int StartButtonWidth, StartButtonHeight;
+int StartAndMiniButtonsWidth = 0;
+int StartAndMiniButtonsHeight = 0;
 char *StartName     = NULL,
      *StartCommand  = NULL,
      *StartPopup    = NULL,
      *StartIconName = NULL;
 
+StartAndMiniButtonItem *First_Start_Button = NULL;
+StartAndMiniButtonItem *Last_Start_Button = NULL;
 
 static char *startopts[] =
 {
@@ -44,6 +52,7 @@
   "StartMenu",
   "StartIcon",
   "StartCommand",
+  "Button",
   NULL
 };
 
@@ -51,7 +60,10 @@
 {
   char *rest;
   char *option;
-  int i;
+  int i, j, k;
+  int titleRecorded = 0, iconRecorded = 0, actionRecorded = 0;
+  char *tokens[100];  // This seems really big
+  char *strtok_ptr;
 
   option = tline + Clength;
   i = GetTokenIndex(option, startopts, -1, &rest);
@@ -60,17 +72,105 @@
   switch(i)
   {
   case 0: /* StartName */
-    CopyString(&StartName, rest);
+    if (First_Start_Button == NULL)
+    {
+      First_Start_Button = Last_Start_Button = (StartAndMiniButtonItem*) 
safemalloc(sizeof(StartAndMiniButtonItem));
+      StartAndMiniButtonItemInit(First_Start_Button);
+      First_Start_Button->isStartButton = TRUE;
+    }
+    First_Start_Button->buttonCaption = safemalloc(strlen(rest) * 
sizeof(char));  // ben
+    CopyString(&(First_Start_Button->buttonCaption), rest);    
     break;
   case 1: /* StartMenu */
-    CopyString(&StartPopup, rest);
+    if (First_Start_Button == NULL)
+    {
+      First_Start_Button = Last_Start_Button = (StartAndMiniButtonItem*) 
safemalloc(sizeof(StartAndMiniButtonItem));
+      StartAndMiniButtonItemInit(First_Start_Button);
+      First_Start_Button->isStartButton = TRUE;
+    }
+    First_Start_Button->isStartButton = TRUE;
+    First_Start_Button->buttonCommand = safemalloc(strlen(rest) * 
sizeof(char));  // ben
+    CopyString(&(First_Start_Button->buttonCommand), rest);   
     break;
   case 2: /* StartIcon */
-    CopyString(&StartIconName, rest);
-    break;
+    if (First_Start_Button == NULL)
+    {
+      First_Start_Button = Last_Start_Button = (StartAndMiniButtonItem*) 
safemalloc(sizeof(StartAndMiniButtonItem));
+      StartAndMiniButtonItemInit(First_Start_Button);
+      First_Start_Button->isStartButton = TRUE;
+    }
+    First_Start_Button->buttonIconFileName = safemalloc(strlen(rest) * 
sizeof(char));  // ben
+    CopyString(&(First_Start_Button->buttonIconFileName), rest);   
+   break;
   case 3: /* StartCommand */
-    CopyString(&StartCommand, rest);
+    if (First_Start_Button == NULL)
+    {
+      First_Start_Button = Last_Start_Button = (StartAndMiniButtonItem*) 
safemalloc(sizeof(StartAndMiniButtonItem));
+      First_Start_Button->isStartButton = TRUE;
+    }
+    First_Start_Button->buttonStartCommand = safemalloc(strlen(rest) * 
sizeof(char));  // ben
+    CopyString(&(First_Start_Button->buttonStartCommand), rest);   
     break;
+  case 4:
+    if (Last_Start_Button == NULL)  // No start button defined - for now 
assuming that the start button must be defined first in fvwmrc
+      First_Start_Button = Last_Start_Button = (StartAndMiniButtonItem*) 
safemalloc(sizeof(StartAndMiniButtonItem));
+    else
+    {  
+      Last_Start_Button->tail = (StartAndMiniButtonItem*) 
safemalloc(sizeof(StartAndMiniButtonItem));
+      Last_Start_Button = Last_Start_Button->tail;
+    }
+
+    StartAndMiniButtonItemInit(Last_Start_Button);  // ben - make a macro later
+    j=0;
+    titleRecorded = iconRecorded = actionRecorded = 0;
+    tokens[j++] = strtok_r(rest, ",", &strtok_ptr);
+    while((tokens[j++] = strtok_r(NULL, ",", &strtok_ptr)))
+      while(*(tokens[j-1])==' ')
+       tokens[j-1]+=sizeof(char);
+    j--;
+
+    for(k=0;k<j;k++)
+    {
+      if (strncmp(tokens[k], "Title", 5)==0)
+      {
+       tokens[j+1] = tokens[k] + ((sizeof(char))*5);
+       while(*(tokens[j+1])==' ')
+         tokens[j+1]+=sizeof(char);
+       Last_Start_Button->buttonCaption = (char *) safemalloc(sizeof(char) * 
(strlen(tokens[j+1])));
+        CopyString(&(Last_Start_Button->buttonCaption), tokens[j+1]);
+       titleRecorded=1;
+      }        
+      else if (strncmp(tokens[k], "Icon", 4)==0)
+      {
+       tokens[j+1] = tokens[k] + ((sizeof(char))*4);
+       while(*(tokens[j+1])==' ')
+         tokens[j+1]+=sizeof(char);
+       Last_Start_Button->buttonIconFileName = (char *) 
safemalloc(sizeof(char) * (strlen(tokens[j+1])));
+       CopyString(&(Last_Start_Button->buttonIconFileName),tokens[j+1] );
+       iconRecorded = 1;
+      }
+      else if (strncmp(tokens[k], "Action", 6)==0)
+      {
+       tokens[j+1] = tokens[k] + ((sizeof(char))*6);
+       while(*(tokens[j+1])==' ')
+         tokens[j+1]+=sizeof(char);
+       Last_Start_Button->buttonCommand = (char *) safemalloc(sizeof(char) * 
(strlen(tokens[j+1])));
+       CopyString(&(Last_Start_Button->buttonCommand), tokens[j+1]);
+       actionRecorded = 1;
+      }
+    }
+
+    if (titleRecorded==0)
+      CopyString(&(Last_Start_Button->buttonCaption), "\0");
+
+    if (iconRecorded==0)
+      CopyString(&(Last_Start_Button->buttonIconFileName), "\0");
+
+    if (actionRecorded==0)
+      CopyString(&(Last_Start_Button->buttonCommand), "\0");
+
+    break;
+
   default:
     /* unknown option */
     return False;
@@ -84,43 +184,179 @@
   FvwmPicture *p = NULL;
   int pw;
   FvwmPictureAttributes fpa;
+  StartAndMiniButtonItem *tempPtr;
 
   fpa.mask = FPAM_NO_ALLOC_PIXELS;
   /* some defaults */
-  if (StartName  == NULL)
-    UpdateString(&StartName, "Start");
-  if (StartIconName == NULL)
-    UpdateString(&StartIconName, "mini-start.xpm");
+  if (First_Start_Button->isStartButton == TRUE)
+  {
+    if (First_Start_Button->buttonCaption == NULL)
+      UpdateString(&(First_Start_Button->buttonCaption), "Start");
+    if (First_Start_Button->buttonIconFileName == NULL)
+      UpdateString(&(First_Start_Button->buttonIconFileName), 
"mini-start.xpm");
+  }
+
+  tempPtr = First_Start_Button;
+
+  while(tempPtr != NULL)
+  {
+    p = PGetFvwmPicture(dpy, win, ImagePath, tempPtr->buttonIconFileName, fpa);
 
-  p = PGetFvwmPicture(dpy, win, ImagePath, StartIconName, fpa);
+    if (p != NULL && strlen(tempPtr->buttonCaption) != 0)  // icon and title
+      pw = p->width + 18;
+    else if (p != NULL) // just icon
+      pw = p->width + 8; 
+    else // just caption
+      pw = 10;
+
+    tempPtr->buttonItem = (Button *)ButtonNew(tempPtr->buttonCaption, p, 
BUTTON_UP,0);
+    tempPtr->width = FlocaleTextWidth(FButtonFont, tempPtr->buttonCaption, 
strlen(tempPtr->buttonCaption)) + pw; 
+    StartAndMiniButtonsWidth += tempPtr->width;
+    tempPtr=tempPtr->tail;
+  }
 
-  StartButton = (Button *)ButtonNew(StartName, p, BUTTON_UP,0);
-  if (p != NULL) pw = p->width+3; else pw = 0;
-  StartButtonWidth = FlocaleTextWidth(FButtonFont, StartName, 
strlen(StartName))
-    + pw + 14;
-  StartButtonHeight = height;
+    First_Start_Button->height = height;
+    StartAndMiniButtonsHeight = First_Start_Button->height;
 }
 
-int StartButtonUpdate(const char *title, int state)
+int StartButtonUpdate(const char *title, int index, int state)
 {
+  int i=0;
+  StartAndMiniButtonItem *tempPtr = First_Start_Button;
+  //fprintf(stderr, "\n\nIn StartButtonUpdate, index=%i, state=%i", index, 
state);
 #if 0
   if (title != NULL)
     ConsoleMessage("Updating StartTitle not supported yet...\n");
-  ButtonUpdate(StartButton, title, state);
+  if(index != -1)
+  {
+    for(i=0; i<index; i++)
+      tempPtr = tempPtr->tail;      
+    ButtonUpdate(tempPtr->buttonItem, title, state);  //huh?
+  }
+  else
+    while(tempPtr != NULL)
+    {
+      ButtonUpdate(tempPtr->buttonItem, title, state);  //huh?
+      tempPtr = tempPtr->tail;
+    }
+
 #else
-  ButtonUpdate(StartButton, NULL, state);
+  if(index != -1)
+  {
+    for(i=0; i<index; i++)
+      tempPtr = tempPtr->tail;      
+    ButtonUpdate(tempPtr->buttonItem, title, state);  //huh?
+  }
+  else
+    while(tempPtr != NULL)
+    {
+      ButtonUpdate(tempPtr->buttonItem, title, state);  //huh?
+      tempPtr = tempPtr->tail;
+    }
+
 #endif
-  return StartButton->needsupdate;
+  tempPtr = First_Start_Button;
+  while(tempPtr != NULL)
+  {
+    if (tempPtr->buttonItem->needsupdate)
+      return 1;
+    tempPtr = tempPtr->tail;    
+  }
+  return 0;
 }
 
+
 void StartButtonDraw(int force)
+{
+  int tempsum, j, i = 0;
+  StartAndMiniButtonItem *tempPtr = First_Start_Button;
+  StartAndMiniButtonItem *tempPtr2 = First_Start_Button;
+
+  while(tempPtr != NULL)
+  {
+    if(tempPtr->buttonItem->needsupdate || force)
+    {
+      tempsum = 0;
+      j=0;
+      tempPtr2 = First_Start_Button;
+      while((tempPtr2 != NULL) && (j<i))
+      {
+       tempsum+=tempPtr2->width;
+       tempPtr2 = tempPtr2->tail;      
+       j++;
+      }      
+      ButtonDraw(tempPtr->buttonItem, tempsum, 0, tempPtr->width, 
First_Start_Button->height);
+    }
+    tempPtr = tempPtr->tail;
+    i++;
+  }
+}
+
+// Returns 1 if in the start or a minibutton, 0 if not; index of button 
pressed put in startButtonPressed
+int MouseInStartButton(int x, int y, int *whichButton, Bool 
*startButtonPressed)
 {
-  if (StartButton->needsupdate || force)
-    ButtonDraw(StartButton, 0, 0, StartButtonWidth, StartButtonHeight);
+  int i=0, j=0;
+  int tempsum = 0;
+
+  StartAndMiniButtonItem *tempPtr = First_Start_Button;
+  StartAndMiniButtonItem *tempPtr2 = First_Start_Button;
+  *startButtonPressed = FALSE;
+
+  while(tempPtr != NULL)
+    {
+      tempsum = 0;
+      j = 0;
+      tempPtr2 = First_Start_Button;
+      while((tempPtr2 != NULL) && (j<i))
+      {
+       tempsum+=tempPtr2->width;
+       tempPtr2 = tempPtr2->tail;      
+       j++;
+      }     
+      if (x >= tempsum && x < tempsum+tempPtr->width && y > 0 && y < 
First_Start_Button->height)
+      {
+       *whichButton = i;
+       if(tempPtr->isStartButton)
+         *startButtonPressed = TRUE;     
+       return 1;
+      }
+      tempPtr = tempPtr->tail;
+      i++;
+    }
+  *whichButton = -1;
+  return 0;
+}
+
+void getButtonCommand(int whichButton, char *tmp)
+{
+  int i=0;
+  StartAndMiniButtonItem *tempPtr = First_Start_Button;
+
+  for(i=0; i<whichButton; i++)
+    tempPtr = tempPtr->tail;
+
+  if(tempPtr->isStartButton)
+      if (tempPtr->buttonCommand != NULL)
+       sprintf(tmp,"Popup %s", tempPtr->buttonCommand);
+      else if (tempPtr->buttonStartCommand != NULL)
+       sprintf(tmp,"%s", tempPtr->buttonStartCommand);
+      else
+       sprintf(tmp,"Popup StarMenu");
+  else
+      sprintf(tmp,"%s", tempPtr->buttonCommand);
 }
 
-int MouseInStartButton(int x, int y)
+void StartAndMiniButtonItemInit(StartAndMiniButtonItem *item)
 {
-  return (x > 0 && x < StartButtonWidth &&
-         y > 0 && y < StartButtonHeight);
+  item->head = NULL;
+  item->tail = NULL;
+  item->index = 0;
+  item->width = 0;
+  item->height = 0;
+  item->isStartButton = FALSE;
+  item->buttonItem = NULL;
+  item->buttonCommand = NULL;
+  item->buttonStartCommand = NULL;
+  item->buttonCaption = NULL;
+  item->buttonIconFileName = NULL;  
 }
Index: Start.h
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmTaskBar/Start.h,v
retrieving revision 1.8
diff -u -r1.8 Start.h
--- Start.h     2002/06/26 13:42:51     1.8
+++ Start.h     2002/09/08 04:18:18
@@ -20,10 +20,24 @@
 #ifndef START_H
 #define START_H
 
+typedef struct startAndMiniButtonItem {
+  struct startAndMiniButtonItem *head, *tail;
+  int index;
+  Button *buttonItem;
+  int width, height;
+  Bool isStartButton; 
+  char *buttonCommand;
+  char *buttonStartCommand;
+  char *buttonCaption;
+  char *buttonIconFileName;
+} StartAndMiniButtonItem;
+
 extern Bool StartButtonParseConfig(char *tline);
 extern void StartButtonInit(int height);
-extern int StartButtonUpdate(const char *title, int state);
+extern void StartAndMiniButtonItemInit(StartAndMiniButtonItem *item);
+extern void AddStartAndMiniButtonItem(StartAndMiniButtonItem *item);
+extern int StartButtonUpdate(const char *title, int index, int state);
 extern void StartButtonDraw(int force);
-extern int  MouseInStartButton(int x, int y);
-
+extern int  MouseInStartButton(int x, int y, int *whichButton, Bool 
*startButtonPressed);
+extern void getButtonCommand(int whichButton, char *tmp);
 #endif

Reply via email to