void ListWheel_AddNumString(WM_HWIN hItem, int startStringNum, int endStringNum)
{
    int i;
    char *str;
    
    for(i=startStringNum;i<=endStringNum;i++){
        str = mymalloc(SRAMIN, sizeof(char)*10);
        sprintf(str, "%d", i);
        LISTWHEEL_AddString(hItem, str);
        myfree(SRAMIN, str);
    }
}
Пример #2
0
/*********************************************************************
*
*       _cbDialog
*/
static void _cbDialog(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;
  int     NCode;
  int     Id;
  // USER START (Optionally insert additional variables)
  // USER END

  switch (pMsg->MsgId)
  {
  	  case WM_INIT_DIALOG:
  	  {

//			  hItem = WM_GetDialogItem(pMsg->hWin, ID_FRAMEWIN_0);
////			  FRAMEWIN_SetResizeable(hItem,1);
//			  FRAMEWIN_SetFont(hItem,GUI_FONT_COMIC24B_ASCII);
////			  FRAMEWIN_SetMoveable(hItem,1);
////			  GUI_ExecCreatedDialog(hItem);
  		  hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
  		  BUTTON_SetSkin(hItem,BUTTON_SKIN_FLEX);

  		  hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_1);
  		  BUTTON_SetSkin(hItem,BUTTON_SKIN_FLEX);
			//
			// Initialization of 'Edit'
			//
			hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0);
			EDIT_SetText(hItem, "blabalbalablablaba");
			//
			// Initialization of 'Listwheel'
			//

			hItem = WM_GetDialogItem(pMsg->hWin, ID_LISTWHEEL_0);
			LISTWHEEL_SetLBorder(hItem,10);
			LISTWHEEL_SetFont(hItem,GUI_FONT_COMIC24B_ASCII);
			LISTWHEEL_AddString(hItem, "jeden");
			LISTWHEEL_AddString(hItem, "dwa");
			LISTWHEEL_AddString(hItem, "trzy");
			LISTWHEEL_AddString(hItem, "cztery");
			LISTWHEEL_AddString(hItem, "piec");
			LISTWHEEL_AddString(hItem, "szesc");
			LISTWHEEL_AddString(hItem, "siedem");
			//
			// Initialization of 'Checkbox'
			//
			hItem = WM_GetDialogItem(pMsg->hWin, ID_CHECKBOX_0);
			CHECKBOX_SetText(hItem, "Check");
			//
			// Initialization of 'Checkbox'
			//
			hItem = WM_GetDialogItem(pMsg->hWin, ID_CHECKBOX_1);
			CHECKBOX_SetText(hItem, "Check");
			// USER START (Optionally insert additional code for further widget initialization)
			// USER END
			 hItem=WM_GetDialogItem(pMsg->hWin,ID_PROGBAR_0);
		     PROGBAR_SetMinMax(hItem,0,15);
		     PROGBAR_SetSkin(hItem,PROGBAR_SKIN_FLEX);

    	break;
  	  }
  case WM_NOTIFY_PARENT:
    Id    = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;
    switch(Id) {
    case ID_EDIT_0: // Notifications sent by 'Edit'
      switch(NCode)
      {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
		  WM_DeleteWindow(hBox);
		  hBox = MESSAGEBOX_Create("Keyboard not supported yet!","ERROR", GUI_MESSAGEBOX_CF_MOVEABLE);
        break;
      case WM_NOTIFICATION_RELEASED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_VALUE_CHANGED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    case ID_BUTTON_0: // Notifications sent by 'Button'
      switch(NCode)
      {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      	  case WM_NOTIFICATION_RELEASED:
		  {

			  CreateMojeokno2();
			  hItem=WM_GetDialogItem(pMsg->hWin,ID_PROGBAR_0);
			  PROGBAR_SetValue(hItem,il++);
			break;
		  }

      }
      break;
    case ID_BUTTON_1: // Notifications sent by 'Button'
      switch(NCode)
      {
		  case WM_NOTIFICATION_CLICKED:
		  {

			break;
		  }
		  case WM_NOTIFICATION_RELEASED:
		  {

			  CreateGraph();
//			  WM_DeleteWindow(hBox);
//			  hBox = MESSAGEBOX_Create("Release the BUTTON !","ERROR", GUI_MESSAGEBOX_CF_MOVEABLE);
//			  WM_DeleteWindow(hBox);
			break;

		  }
      }
      break;
    case ID_LISTWHEEL_0: // Notifications sent by 'Listwheel'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_SEL_CHANGED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    case ID_CHECKBOX_0: // Notifications sent by 'Checkbox'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_VALUE_CHANGED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    case ID_CHECKBOX_1: // Notifications sent by 'Checkbox'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_VALUE_CHANGED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    // USER START (Optionally insert additional code for further Ids)
    // USER END
    }
    break;
  // USER START (Optionally insert additional message handling)
  // USER END
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}