コード例 #1
0
ファイル: C-NNews.c プロジェクト: jens-maus/newsrog
static Object *MkIB(SW_IDATA *idata, ULONG l, ULONG h, STRPTR Img,
                    LONG Ctrl, ULONG Style)
{
   Object *g = VGroup,
      Child, DTImgObject,
         MUIA_InnerTop,        0,
         MUIA_InnerBottom,     0,
         MUIA_InnerLeft,       0,
         MUIA_InnerRight,      0,
         MUIA_Frame,           MUIV_Frame_ImageButton,
         MUIA_InputMode,       MUIV_InputMode_RelVerify,
         MUIA_ControlChar,     Ctrl,
         MUIA_ShortHelp,       GetS(h),
         MUIA_CycleChain,      1,
         SWA_DTImg_FSpec,      Img,
         SWA_DTImg_Adjust,     TRUE,
         SWA_DTImg_ImgCache,   idata->SWA_NNews_DTImages,
         SWA_DTImg_Path,       idata->SWA_NNews_ButtonPath,
      End,
   End;

   if (TBHasLab(Style) && g)
      DoMethod(g, OM_ADDMEMBER, CLabel(GetS(l)));

   return g;
}
コード例 #2
0
ファイル: opstring.cpp プロジェクト: prestocore/browser
OP_STATUS OpString16::SetConcat(
	const OpStringC16& str1, const OpStringC16& str2,
	const OpStringC16& str3, const OpStringC16& str4)
{
	if (iBuffer)
		*iBuffer = '\0';
	return AppendFormat(UNI_L("%s%s%s%s"), GetS(str1), GetS(str2), GetS(str3), GetS(str4));
}
コード例 #3
0
ファイル: Grid.cpp プロジェクト: humeaua/Sudoku
bool Grid::isConsistent()
{
    bool result = true;
    if(Col1().isConsistent()){result=false;}
    if(Col2().isConsistent()){result=false;}
    if(Col3().isConsistent()){result=false;}
    if(Col4().isConsistent()){result=false;}
    if(Col5().isConsistent()){result=false;}
    if(Col6().isConsistent()){result=false;}
    if(Col7().isConsistent()){result=false;}
    if(Col8().isConsistent()){result=false;}
    if(Col9().isConsistent()){result=false;}

    if(Row1().isConsistent()){result=false;}
    if(Row2().isConsistent()){result=false;}
    if(Row3().isConsistent()){result=false;}
    if(Row4().isConsistent()){result=false;}
    if(Row5().isConsistent()){result=false;}
    if(Row6().isConsistent()){result=false;}
    if(Row7().isConsistent()){result=false;}
    if(Row8().isConsistent()){result=false;}
    if(Row9().isConsistent()){result=false;}
    
    if(GetNO().isConsistent()){result=false;}
    if(GetN().isConsistent()){result=false;}
    if(GetNE().isConsistent()){result=false;}
    if(GetO().isConsistent()){result=false;}
    if(GetC().isConsistent()){result=false;}
    if(GetE().isConsistent()){result=false;}
    if(GetSO().isConsistent()){result=false;}
    if(GetS().isConsistent()){result=false;}
    if(GetSE().isConsistent()){result=false;}
    
    return result;
}
コード例 #4
0
//***************************************************************
EVENT_TYPE	TUsartGSM::OnEvent(TEvent* Event)
{uint16_t	msgMsg = msgEmpty	;

 strRcv = GetS(RcvBuf,LenBF)								;// есть принятые строки?
 cntRcv = (strRcv && *strRcv)? strlen(strRcv) : 0			;// сколько их?
 if(strRcv && cntRcv){ msgMsg = Parse(strRcv,cntRcv)		;  strRcv = 0	;}

 if(!msgMsg) msgMsg = OnEventGSM()							;
 if(!timOut && !msgMsg){ msgMsg = msgTimeOut ; timOut = -1	;}
 if(msgMsg != msgEmpty){ timOut = Operate(msgMsg)			;}// !!!!!!!!!!!!!!!!!
 if(timOut <= 0) timOut = TIM_IDLE							;

 if(prStateTrg != StateTrg || prSttPhase != SttPhase){
   prStateTrg = StateTrg	; prSttPhase = SttPhase			;
   sprintf(StrStt,"%s, %d",strStat[StateTrg],SttPhase)		; strStt = StrStt	;}
 
 switch(Event->Type){
 case evGetEvent:
   if(strDbg)     { Event->Type = evDbgMsg1	; Event->strData[0] = strDbg		; strDbg = 0	;}
   else if(strMsg){ Event->Type = evDbgMsg2	; Event->strData[0] = (char*)strMsg	; strMsg = 0	;}
   else if(flEventNeed){ Event->Type = flEventNeed	; Event->Value = flValueNeed; flEventNeed=0	;}
   else if(strStt){ Event->Type = evStat1	; Event->strData[0] = strStt		; strStt = 0	;}
   else if(flInitOK){Event->Type = evGsmInitOK	; flInitOK = 0	;}
 break	;
 
// case evClearPswGSM	: PswGSM = 0	; if(FnSetPswGSM ) FnSetPswGSM(PswGSM)			; break	;
 
	// если произошло событие по которому необходимо отправить инфоСМС, то
 case evEventSMS :  strncpy(PhoneNmbrSMS,GetMasterNmbr(),16)					;// отправить инф. СМС на MasterNmbr
					if(!StrCmp(PhoneNmbrSMS,strValidNmbr)){		 				 // если он валидный
					  NeedSendSMS = 1 ; timGuardSMS = 0							;}
					else{ *PhoneNmbrSMS = 0	; SetMasterNmbr(PhoneNmbrSMS)		;}// иначе, стереть его
		break	;
 } 
 return Event->Type		;}
コード例 #5
0
ファイル: C-NServerList.c プロジェクト: jens-maus/newsrog
static ULONG CreateListCol(Object *o, SW_IDATA *idata)
{
   ULONG x;
   
   static STRPTR ColNames[16];

   for (x=0; ColSpecs[x]; x++)
      ColNames[x] = GetS(SWS_L_Default + x) + sizeof(MUIX_U MUIX_B) - 1;

   ColNames[x] = NULL;

   if (!(idata->SWA_NServerList_ListCol =
         MUI_NewObject(SWC_ListCol,
                       SWA_ListCol_ColSpecs, ColSpecs,
                       SWA_ListCol_ColNames, ColNames,
                       SWA_ListCol_Hook,     &idata->DspHook,
                       SWA_ListCol_List,     o,
                       TAG_DONE)))
      return FAILURE;

   DoMethod(idata->SWA_NServerList_ListCol, SWM_ListCol_HideCols,
            8, 9, 10, 11, -1);

   return SUCCESS;
}
コード例 #6
0
ファイル: C-NSF-HeaderMatch.c プロジェクト: jens-maus/newsrog
static ULONG CreateListmgr(Object *o, SW_IDATA *idata)
{
   setlent(o, SWA_ObjNoChildCopy, TRUE);

   idata->SWA_NList_LV = ListviewObject,
      MUIA_CycleChain,           1,
      MUIA_Listview_Input,       TRUE,
      MUIA_ShortHelp,            GetS(SWS_H_HMList),
      MUIA_Listview_DragType,    MUIV_Listview_DragType_Immediate,
      MUIA_Listview_MultiSelect, MUIV_Listview_MultiSelect_Default,
      MUIA_Listview_List, idata->SWA_NList_L = ObjListObject,
         InputListFrame,
         SWA_ObjList_Object,      o,
         MUIA_List_Format,        "COL=0,"
                                  "COL=1,"
                                  "COL=2 BAR,"
                                  "COL=3 W=20 BAR,"
                                  "COL=4 W=50",
         MUIA_List_DragSortable,  TRUE,
         MUIA_List_Title,         TRUE,
         MUIA_List_DisplayHook,   &idata->DspHook,
         MUIA_List_DestructHook,  &idata->DstHook,
      End,
   End;

   if (!idata->SWA_NList_LV) return FAILURE;

   DoMethod(o, OM_ADDMEMBER, idata->SWA_NList_LV);

   return SUCCESS;
}
コード例 #7
0
ファイル: opstring.cpp プロジェクト: prestocore/browser
OP_STATUS OpString8::SetConcat(
	const OpStringC8& str1, const OpStringC8& str2,
	const OpStringC8& str3, const OpStringC8& str4,
	const OpStringC8& str5, const OpStringC8& str6,
	const OpStringC8& str7, const OpStringC8& str8)
{
	if (iBuffer)
		*iBuffer = '\0';
	return AppendFormat("%s%s%s%s%s%s%s%s", GetS(str1), GetS(str2), GetS(str3), GetS(str4),
											GetS(str5), GetS(str6), GetS(str7), GetS(str8));
}
コード例 #8
0
Object *MkNewGrp(Object *o, SW_IDATA *idata, STRPTR Name)
{
   if (SWGetUL(idata->SWA_NList_L, MUIA_List_Entries) < SWV_NGroupList_MaxUnreg ||
       NN_RegMsg(idata, GetS(SWS_L_UnregMsg), _win(o)) == SUCCESS)
      return MUI_NewObject(SWC_NGroup,
                           AppBaseDefTop(idata),
                           SWA_NGroup_Name, SW_STRDEF(Name, ""),
                           TAG_DONE);
   
   return NULL;
}
コード例 #9
0
ファイル: FbxParser.cpp プロジェクト: luxuia/JustEngine
	void FbxParser::ApplyLocalTransform(GameObjectPtr node, FbxNode* fbxNode)
	{
		auto matrix = fbxNode->EvaluateLocalTransform();
		auto fbxQ = matrix.GetQ();
		auto fbxT = matrix.GetT();
		auto fbxS = matrix.GetS();

		Vector3 trans{ fbxT.mData };
		Vector3 scale{ fbxS.mData };
		Quaternion rotation{ (float)fbxQ.mData[0], (float)fbxQ.mData[1], (float)fbxQ.mData[2], (float)fbxQ.mData[3]};

		node->SetLocalPosition(trans);
		node->SetLocalRotate(rotation);
		node->SetLocalScale(scale);
	}
コード例 #10
0
ファイル: MYTEST2Doc.cpp プロジェクト: ygangw/MIProcessor
void  CMYTEST2Doc::ChangeSize()
{
	CChangesize Dlg;
	
if(Dlg.DoModal()==IDOK)
		{
	 Mat m_dstRGB=m_srcRGB;
	Size GetS(Dlg.m_Width,Dlg.m_Height);
	if(Dlg.m_Width<m_dstRGB.cols&&Dlg.m_Height<m_dstRGB.rows)
	resize(m_srcRGB,m_dstRGB,GetS,CV_INTER_AREA);
	else
	resize(m_srcRGB,m_dstRGB,GetS,CV_INTER_LINEAR);
	Mat16bToCImage(m_srcMaxValue, m_srcMinValue,m_dstRGB,bWhiteZero);

	}
}
コード例 #11
0
ファイル: Calculator2.cpp プロジェクト: seungwoonlee/dream
void main(void)
{
	char ConsoleBuf[MAX_BUF2] = { 0, };

	int count;
	PutS("> Console Calculator\n");
	PutS("> Available Command :  print [a]|[z] , quit , <Enter>\n> \n");

	while (1)
	{
		PutS("> ");		// Prompt
		count = GetS(ConsoleBuf);

		if (!ParseBuf(ConsoleBuf))	// 입력이 NULL 이면 멈춘다.
		{
			break;
		}
	}
	PutS(ConsoleBuf);	
	PutInt(count);
	return;
}
コード例 #12
0
ファイル: C-NPostList.c プロジェクト: jens-maus/newsrog
static ULONG CreateListCol(Object *o, SW_IDATA *idata)
{
   ULONG x;
   
   static STRPTR ColNames[8];

   for (x=0; ColSpecs[x]; x++)
      ColNames[x] = GetS(SWS_T_Lines + x) + sizeof(MUIX_U MUIX_B) - 1;

   ColNames[x] = NULL;

   if (!(idata->SWA_NPostList_ListCol =
         MUI_NewObject(SWC_ListCol,
                       SWA_ListCol_ColSpecs, ColSpecs,
                       SWA_ListCol_ColNames, ColNames,
                       SWA_ListCol_Hook,     &idata->DspHook,
                       SWA_ListCol_List,     o,
                       TAG_DONE)))
      return FAILURE;

   return SUCCESS;
}
コード例 #13
0
ファイル: C-NServerList.c プロジェクト: jens-maus/newsrog
static Object *MkBt(ULONG l, ULONG h) { return SWUI_Button(GetS(l),GetS(h)); }
コード例 #14
0
ファイル: C-NNews.c プロジェクト: jens-maus/newsrog
static ULONG MakeObjs(Object *o, SW_IDATA *idata)
{
   if (!(idata->SWA_NNews_TCPList =
         MUI_NewObject(SWC_NTCPList,    AppBaseTopObj(o), TAG_DONE))   ||
       !(idata->SWA_NNews_ArtMgr  =
         MUI_NewObject(SWC_NArticleMgr, AppBaseTopObj(o), TAG_DONE))   ||
       !(idata->SWA_NNews_ArtTpl  =
         MUI_NewObject(SWC_NArticle,
                       SWA_NArticle_MemPool, idata->SWA_NNews_MemPool,
                       TAG_DONE))                                      ||
       !(idata->SWA_NNews_ServList =
         MUI_NewObject(SWC_NServerList, AppBaseTopObj(o), TAG_DONE))   ||
       !(idata->SWA_NNews_PostList =
         MUI_NewObject(SWC_NPostList,   AppBaseTopObj(o), TAG_DONE))   ||
       !(idata->SWA_NNews_SvPostList =
         MUI_NewObject(SWC_NPostList,
                       AppBaseTopObj(o),
                       SWA_NPostList_Saved, TRUE,
                       TAG_DONE))                                      ||
       !(idata->SWA_NNews_MMList =
         MUI_NewObject(SWC_FileTypes,   TAG_DONE))                     ||
       !(idata->SWA_NNews_FAList =
         MUI_NewObject(SWC_FileActs,    TAG_DONE))                     ||
       !(idata->SWA_NNews_GroupList =
         MUI_NewObject(SWC_NGroupList,  AppBaseTopObj(o), TAG_DONE))) {
      return FAILURE;
   }

   idata->Obj                          = o;

   idata->Win[SWV_GrpListWin].Contents = &idata->SWA_NNews_GroupList;
   idata->Win[SWV_SrvListWin].Contents = &idata->SWA_NNews_ServList;
   idata->Win[SWV_TcpListWin].Contents = &idata->SWA_NNews_TCPList;
   idata->Win[SWV_PstListWin].Contents = &idata->PLGrp;
   idata->Win[SWV_MMListWin].Contents  = &idata->MMGrp;
   idata->Win[SWV_CfgListWin].Contents = &idata->Config;
   idata->Win[SWV_NNewsWin].Contents   = &idata->Obj;

   idata->Win[SWV_GrpListWin].Title    = GetS(SWS_T_Groups);
   idata->Win[SWV_SrvListWin].Title    = GetS(SWS_T_Servers);
   idata->Win[SWV_TcpListWin].Title    = GetS(SWS_T_TCP);
   idata->Win[SWV_PstListWin].Title    = GetS(SWS_T_Post);
   idata->Win[SWV_MMListWin].Title     = GetS(SWS_T_MM);
   idata->Win[SWV_CfgListWin].Title    = GetS(SWS_T_Cfg);
   idata->Win[SWV_NNewsWin].Title      = GetS(SWS_T_NNews);

   idata->Win[SWV_GrpListWin].ID       = MAKE_ID('G','r','p','l');
   idata->Win[SWV_SrvListWin].ID       = MAKE_ID('S','r','v','l');
   idata->Win[SWV_TcpListWin].ID       = MAKE_ID('T','c','p','l');
   idata->Win[SWV_PstListWin].ID       = MAKE_ID('P','s','t','l');
   idata->Win[SWV_MMListWin].ID        = MAKE_ID('M','m','T','y');
   idata->Win[SWV_CfgListWin].ID       = MAKE_ID('C','o','n','f');
   idata->Win[SWV_NNewsWin].ID         = MAKE_ID('B','l','r','g');

   idata->Win[SWV_GrpListWin].LastVar  = SWA_NNews_GrpListLast;
   idata->Win[SWV_SrvListWin].LastVar  = SWA_NNews_SrvListLast;
   idata->Win[SWV_TcpListWin].LastVar  = SWA_NNews_TCPListLast;
   idata->Win[SWV_PstListWin].LastVar  = SWA_NNews_PstListLast;
   idata->Win[SWV_MMListWin].LastVar   = SWA_NNews_MMListLast;
   idata->Win[SWV_CfgListWin].LastVar  = SWA_NNews_CfgWinLast;
   idata->Win[SWV_NNewsWin].LastVar    = NULL;

   idata->Win[SWV_GrpListWin].OpenVar  = SWA_NNews_GrpListOpen;
   idata->Win[SWV_SrvListWin].OpenVar  = SWA_NNews_SrvListOpen;
   idata->Win[SWV_TcpListWin].OpenVar  = SWA_NNews_TCPListOpen;
   idata->Win[SWV_PstListWin].OpenVar  = SWA_NNews_PstListOpen;
   idata->Win[SWV_MMListWin].OpenVar   = SWA_NNews_MMListOpen;
   idata->Win[SWV_CfgListWin].OpenVar  = SWA_NNews_CfgWinOpen;
   idata->Win[SWV_NNewsWin].OpenVar    = NULL;

   return SUCCESS;
}
コード例 #15
0
ファイル: geometry.hpp プロジェクト: shanfl/collectcode
	float	Get(int i) const { if (i==0) return GetS(); else return V.Get(i-1); }
コード例 #16
0
ファイル: C-NNews.c プロジェクト: jens-maus/newsrog
static ULONG CreateObj(Object *o, SW_IDATA *idata)
{
   ULONG x, rc = FAILURE;

   if (!idata->SWA_AppBase_TopObj)
      idata->SWA_AppBase_TopObj = o;

   idata->ArtLst = MUI_NewObject(SWC_NArticleList,
                                 SWA_NArticleList_NoUI, TRUE,
                                 TAG_DONE);
   
   if (!idata->ArtLst) goto Done;

   idata->DTImg = DTImgObject, End;
   if (!idata->DTImg) goto Done;

   if (!(idata->SWA_NNews_DTImages =
         (DTImgCache*)DoMethod(idata->DTImg, SWM_DTImg_MakeImgCache)))
      goto Done;
   
   if (!(idata->SWA_NNews_ArtListCol = MUI_NewObject(SWC_ListCol,
          SWA_ListCol_ColSpecs, SWGetUL(idata->ArtLst, SWA_NArticleList_ColSpecs),
          SWA_ListCol_ColNames, SWGetUL(idata->ArtLst, SWA_NArticleList_ColNames),
          SWA_ListCol_FixWidth, FALSE,
          TAG_DONE)))
      goto Done;

   SetColSpecs(idata);

   DoMethod(idata->SWA_NNews_ArtListCol, SWM_ListCol_HideCols, 8, 9, -1);

   if (!(idata->SWA_NNews_VarList = MUI_NewObject(SWC_VarList,
                                                  AppBaseDefTop(idata),
                                                  TAG_DONE)))
      goto Done;
 
   if (!(idata->SWA_NNews_HdrList = MUI_NewObject(SWC_NHdrList,
                                                  AppBaseDefTop(idata),
                                                  TAG_DONE)))
      goto Done;


   GetUserJunk(o, idata);
   
   SetAttrs(o,            
            SWA_AppBase_ExitMode, SWV_AppBase_EM_Save,
            TAG_DONE);

   if (!(idata->SWA_NNews_MemPool = SWPoolCreate(MEMF_ANY|MEMF_CLEAR,
                                                 1024*80, 512, NULL)))
      goto Done;

   for (x=0; x<(SWS_L_CfgLast - SWS_L_CfgTab0 + 1); x++)
      idata->CfgTabs[x]   = GetS(SWS_L_CfgTab0 + x),
      idata->CfgTabs[x+1] = NULL;

   for (x=0; x<(SWS_L_FltLast - SWS_L_FltTab0 + 1); x++)
      idata->FltTabs[x]   = GetS(SWS_L_FltTab0 + x),
      idata->FltTabs[x+1] = NULL;

   idata->MMTabs[0] = GetS(SWS_L_FTypes);
   idata->MMTabs[1] = GetS(SWS_L_FActs);
   idata->MMTabs[2] = NULL;
   
   idata->PLTabs[0] = GetS(SWS_L_PToSend);
   idata->PLTabs[1] = GetS(SWS_L_PSent);
   idata->PLTabs[2] = NULL;
   
   if (CreateGlobFlt(o, idata) != SUCCESS)
      goto Done;

   if (MakeObjs(o, idata) != SUCCESS) goto Done;

   SetAttrs(o,
            GroupFrame,
            MUIA_Group_Horiz,    TRUE,
            MUIA_Background,     MUII_GroupBack,
            TAG_DONE);

   SetAttrs(o,
            SWA_AppBase_Cost1,     30,
            SWA_AppBase_Cost2,     35,
            SWA_AppBase_AppName,   APPNAME,
            SWA_AppBase_UnregSave, FALSE,
            TAG_DONE);

   DoMethod(SWGetObj(o, SWA_AppBase_App), MUIM_Notify,
            MUIA_Application_DoubleStart, TRUE,
            o, 5, MUIM_Application_PushMethod, o, 2,
            MUIV_Application_ReturnID_Quit, MUIV_Application_ReturnID_Quit);
   
   rc = SUCCESS;

  Done:
   return rc;
}
コード例 #17
0
ファイル: Grid.cpp プロジェクト: humeaua/Sudoku
Row Grid::Row9()
{
    RowHolder rH = GetSO().BottomRow(), rC = GetS().BottomRow(), rB = GetSE().BottomRow();
    return Row(rH, rC, rB);
}
コード例 #18
0
ファイル: Grid.cpp プロジェクト: humeaua/Sudoku
Row Grid::Row8()
{
    RowHolder rH = GetSO().MiddleRow(), rC = GetS().MiddleRow(), rB = GetSE().MiddleRow();
    return Row(rH, rC, rB);
}
コード例 #19
0
ファイル: Grid.cpp プロジェクト: humeaua/Sudoku
Row Grid::Row7()
{
    RowHolder rH = GetSO().TopRow(), rC = GetS().TopRow(), rB = GetSE().TopRow();
    return Row(rH, rC, rB);
}
コード例 #20
0
ファイル: Grid.cpp プロジェクト: humeaua/Sudoku
Column Grid::Col6()
{
    ColumnHolder sH = GetN().RightColumn(), sC = GetC().RightColumn(), sB = GetS().RightColumn();
    return Column(sH, sC, sB);
}
コード例 #21
0
ファイル: Grid.cpp プロジェクト: humeaua/Sudoku
Column Grid::Col5()
{
    ColumnHolder sH = GetN().MiddleColumn(), sC = GetC().MiddleColumn(), sB = GetS().MiddleColumn();
    return Column(sH, sC, sB);
}
コード例 #22
0
ファイル: MYTEST2Doc.cpp プロジェクト: ygangw/MIProcessor
void CMYTEST2Doc::ToBig()
{    
	
	Size GetS(Dst.cols*2,Dst.rows*2);
	SizeSelect(GetS);
}
コード例 #23
0
ファイル: C-NServerList.c プロジェクト: jens-maus/newsrog
static ULONG CreateObj(Object *o, SW_IDATA *idata, struct TagItem *ti)
{
   Object *g, *to, *b_Add, *b_Del, *b_Sort, *b_Reset,
          *b_MkDef = NULL, *b_RdEnv;

   ULONG    Tiny = GetTagUL(SWA_NServerList_Tiny,        NULL, ti);
   Object  *SObj = GetTagObj(SWA_NServerList_HostStrObj, NULL, ti);

   if (Tiny && !SObj) SWDB_RET(FAILURE);
   
   set(o, MUIA_Group_Horiz, FALSE);

   if (!Tiny) {
      DoMethod(o, OM_ADDMEMBER,
               to = SWUI_FrameText(GetS(SWS_L_TopTitle), 0,
                                   (HGroup,
                                    Child, (Object *)
                                       DoMethod(idata->SWA_NServerList_ListCol,
                                                SWM_ListCol_Popup,
                                                '-', GetS(SWS_H_ListCol)),
                                    Child, (Object *)
                                       DoMethod(idata->SWA_NServerList_ListCol,
                                                SWM_ListCol_ClipBt,
                                                'c', GetS(SWS_H_Clip)),
                                    End), NULL));

      if (!to) return FAILURE;
   }

   DoMethod(o, OM_ADDMEMBER,
            idata->SWA_NList_LV = ListviewObject,
            MUIA_CycleChain,           1,
            MUIA_Listview_Input,       TRUE,
            MUIA_Listview_MultiSelect, MUIV_Listview_MultiSelect_Default,
            MUIA_Listview_DragType,    MUIV_Listview_DragType_Immediate,
            MUIA_Listview_List, idata->SWA_NList_L = ObjListObject,
            InputListFrame,
            SWA_ObjList_Object,       o,
            MUIA_List_Format,         DoMethod(idata->SWA_NServerList_ListCol,
                                               SWM_ListCol_BuildFmt),
            MUIA_List_DragSortable,  TRUE,
            MUIA_List_Title,         TRUE,
            MUIA_List_DisplayHook,   &idata->DspHook,
            MUIA_List_DestructHook,  &idata->DstHook,
            MUIA_List_CompareHook,   &idata->CmpHook,
            End,
          End);

   if (!idata->SWA_NList_LV) return FAILURE;

   SWM_SetListColNotify(idata->SWA_NServerList_ListCol, idata->SWA_NList_L);

   if (!Tiny) {
      static STRPTR TypeLab[4];

      TypeLab[0] = GetS(SWS_L_TypeNNTP);
      TypeLab[1] = GetS(SWS_L_TypeFTP);
      TypeLab[2] = NULL;
      
      DoMethod(idata->SWA_NList_L, MUIM_Notify,
               MUIA_List_Entries, MUIV_EveryTime,
               to, 4, MUIM_SetAsString, MUIA_Text_Contents,
               GetS(SWS_L_TopTitle), MUIV_TriggerValue);

      DoMethod(o, OM_ADDMEMBER,
               g = VGroup,
                  MUIA_Background, MUII_GroupBack,
                  Child, ColGroup(2),
                     Child, b_Add  = MkBt(SWS_B_Add,    SWS_H_Add),
                     Child, HGroup,
                        Child, s_Host = StringObject,
                                           StringFrame,
                                           MUIA_CycleChain,     1,
                                           MUIA_HorizWeight, 5000,
                                        End,
                        Child, Label2(GetS(SWS_L_Type)),
                        Child, s_Type = CycleObject,
                           MUIA_Cycle_Entries, TypeLab,
                           MUIA_CycleChain,    1,
                           MUIA_ShortHelp,     GetS(SWS_H_Type),
                           MUIA_Disabled,      TRUE,
                        End,
                     End,
                     Child, Label2(GetS(SWS_L_Port)),
                     Child, s_Port = NewObject(SWObjStringClass(), NULL,
                        StringFrame,
                        MUIA_CycleChain,    1,
                        MUIA_String_Accept, "0123456879",
                        MUIA_String_MaxLen,      8,
                        MUIA_ShortHelp,     GetS(SWS_H_Port),
                        MUIA_Disabled,      TRUE,
                        TAG_DONE),
                     Child, Label2(GetS(SWS_L_CxTO)),
                     Child, s_CxTO = NewObject(SWTimesliderClass(), NULL,
                                               MUIA_Numeric_Min,   5*1000,
                                               MUIA_Numeric_Max,   10*60*1000,
                                               MUIA_Numeric_Value, 30*1000,
                                               MUIA_CycleChain,    1,
                                               MUIA_ShortHelp, GetS(SWS_H_CxTO),
                                               MUIA_Disabled,      TRUE,
                                               TAG_DONE),
                     Child, Label2(GetS(SWS_L_CxRT)),
                     Child, s_CxRT = NewObject(SWTimesliderClass(), NULL,
                                               MUIA_Numeric_Min,   5*1000,
                                               MUIA_Numeric_Max,   10*60*1000,
                                               MUIA_Numeric_Value, 30*1000,
                                               MUIA_CycleChain,    1,
                                               MUIA_ShortHelp, GetS(SWS_H_CxRT),
                                               MUIA_Disabled,      TRUE,
                                               TAG_DONE),
                     Child, Label2(GetS(SWS_L_CxMR)),
                     Child, s_CxMR = SliderObject,
                        MUIA_Numeric_Min,   0,
                        MUIA_Numeric_Max,   50,
                        MUIA_Numeric_Value, 5,
                        MUIA_CycleChain,    1,
                        MUIA_ShortHelp,     GetS(SWS_H_CxMR),
                        MUIA_Disabled,      TRUE,
                     End,
                     Child, Label2(GetS(SWS_L_AUser)),
                     Child, HGroup,
                        Child, s_User = StringObject,
                                           StringFrame,
                                           MUIA_CycleChain,  1,
                                           MUIA_ShortHelp, GetS(SWS_H_AuthUser),
                                           MUIA_String_MaxLen, 48,
                                           MUIA_Disabled,      TRUE,
                                        End,
                        Child, Label2(GetS(SWS_L_APass)),
                        Child, s_Pass = StringObject,
                                           StringFrame,
                                           MUIA_CycleChain,    1,
                                           MUIA_String_Secret, TRUE,
                                           MUIA_ShortHelp, GetS(SWS_H_AuthPass),
                                           MUIA_String_MaxLen, 48,
                                           MUIA_Disabled,      TRUE,
                                        End,
                     End,
                  End,
                  Child, HGroup,
                     MUIA_Group_SameSize, TRUE,
                     Child, b_Del   = MkBt(SWS_B_Del,   SWS_H_Del),
                     Child, b_Sort  = MkBt(SWS_B_Sort,  SWS_H_Sort),
                     Child, b_Reset = MkBt(SWS_B_Reset, SWS_H_Reset),
                     Child, b_MkDef = MkBt(SWS_B_MkDef, SWS_H_MkDef),
                     Child, b_RdEnv = MkBt(SWS_B_RdEnv, SWS_H_RdEnv),
                  End,
               End);
      s_CxTOAttr  = SWA_NServer_CxTimeout;
      s_CxTODef   = 30*1000;
      s_CxTOGAttr = MUIA_Numeric_Value;
      s_CxRTAttr  = SWA_NServer_RetryDelay;
      s_CxRTDef   = 30*1000;
      s_CxRTGAttr = MUIA_Numeric_Value;
      s_CxMRAttr  = SWA_NServer_MaxRetries;
      s_CxMRDef   = 0,
      s_CxMRGAttr = MUIA_Numeric_Value;
      s_UserAttr  = SWA_NServer_AuthUser;
      s_PassAttr  = SWA_NServer_AuthPass;
      s_TypeAttr  = SWA_NServer_Type;
      s_TypeDef   = SWV_NServer_Type_NNTP;
      s_TypeGAttr = MUIA_Cycle_Active;
      s_PortAttr  = SWA_NServer_Port;
      s_PortGAttr = SWA_ObjString_NumVal;
   } else {
      if (!(idata->FmtSlider = NewObject(SWTimesliderClass(), NULL, TAG_DONE)))
         return FAILURE;
      
      DoMethod(o, OM_ADDMEMBER,
               g = HGroup,
                  MUIA_Background,     MUII_GroupBack,
                  MUIA_Group_SameSize, TRUE,
                  Child, b_Add   = MkBt(SWS_B_Add,   SWS_H_Add),
                  Child, b_Del   = MkBt(SWS_B_Del,   SWS_H_Del),
                  Child, b_Sort  = MkBt(SWS_B_Sort,  SWS_H_Sort),
                  Child, b_Reset = MkBt(SWS_B_Reset, SWS_H_Reset),
                  Child, b_RdEnv = MkBt(SWS_B_RdEnv, SWS_H_RdEnv),
               End);
      s_Host = SObj;
   }

   if (!g) return FAILURE;

   SetAttrs(s_Host,
            MUIA_Disabled,              TRUE,
            MUIA_String_AttachedList,   idata->SWA_NList_LV,
            TAG_DONE);

   s_HostAttr  = SWA_NServer_Host;

   DoMethod(b_Sort,  NOTP, o, 1, MUIM_List_Sort);
   DoMethod(b_Del,   NOTP, o, 1, SWM_NList_RemoveSel);
   DoMethod(b_Add,   NOTP, o, 2, SWM_NList_Add, NULL);
   DoMethod(b_RdEnv, NOTP, o, 2, SWM_NServerList_NNTPSERVER, TRUE);

   if (b_MkDef) {
      DoMethod(b_MkDef, NOTP, o, 1, SWM_NServerList_ResetDefault);
      DoMethod(b_MkDef, NOTP, o, 8, SWM_Root_ListDoMethod,
               idata->SWA_NList_LV, SWV_ListDoMethod_Active,
               SWV_ListDoMethod_Entry, 3,
               MUIM_Set, SWA_NServer_Default, TRUE);
   }

   DoMethod(b_Add, NOTP, MUIV_Notify_Window, 3,
            MUIM_Set, MUIA_Window_ActiveObject, s_Host);

   DoMethod(b_Reset, NOTP, o, 6, SWM_Root_ListDoMethod,
            idata->SWA_NList_LV,
            SWV_ListDoMethod_Selected, SWV_ListDoMethod_Entry, 1,
            SWM_NServer_ResetStats);

   setlent(o, SWA_ObjNoChildCopy, TRUE);

   return SUCCESS;
}
コード例 #24
0
ファイル: C-NPostList.c プロジェクト: jens-maus/newsrog
static ULONG CreateObj(Object *o, SW_IDATA *idata, struct TagItem *ti)
{
   Object *g, *to, *b_Add = NULL, *b_Del, *b_Edit, *b_SelAll, *b_Xfer;

   set(o, MUIA_Group_Horiz, FALSE);

   // -- set init-time attrs for saved/postdir -------------------------------
   
   idata->SWA_NPostList_PostDir =
      (idata->SWA_NPostList_Saved = GetTagUL(SWA_NPostList_Saved, FALSE, ti)) ?
         SWV_NPostList_PostSvDir : SWV_NPostList_DefPostDir;

   DoMethod(o, OM_ADDMEMBER,
            to = SWUI_FrameText(GetS(SWS_L_TopTitle), 0,
                                (HGroup,
                                 Child, (Object *)
                                    DoMethod(idata->SWA_NPostList_ListCol,
                                             SWM_ListCol_Popup,
                                             '-', GetS(SWS_H_ListCol)),
                                 Child, (Object *)
                                    DoMethod(idata->SWA_NPostList_ListCol,
                                             SWM_ListCol_ClipBt,
                                             'c', GetS(SWS_H_Clip)),
                                 End), NULL));

   if (!to) return FAILURE;

   DoMethod(o, OM_ADDMEMBER,
            idata->SWA_NList_LV = ListviewObject,
            MUIA_CycleChain,           1,
            MUIA_ShortHelp,            GetS(SWS_H_List),
            MUIA_Listview_Input,       TRUE,
            MUIA_Listview_MultiSelect, MUIV_Listview_MultiSelect_Default,
            MUIA_Listview_DragType,    MUIV_Listview_DragType_Immediate,
            MUIA_Listview_List, idata->SWA_NList_L = ObjListObject,
            InputListFrame,
            SWA_ObjList_Object,       o,
            MUIA_List_Format,         DoMethod(idata->SWA_NPostList_ListCol,
                                               SWM_ListCol_BuildFmt),
            MUIA_List_DragSortable,  TRUE,
            MUIA_List_Title,         TRUE,
            MUIA_List_DisplayHook,   &idata->DspHook,
            MUIA_List_DestructHook,  &idata->DstHook,
            MUIA_List_CompareHook,   &idata->CmpHook,
            End,
          End);

   if (!idata->SWA_NList_LV) return FAILURE;

   SWM_SetListColNotify(idata->SWA_NPostList_ListCol, idata->SWA_NList_L);

   DoMethod(idata->SWA_NList_L, MUIM_Notify,
            MUIA_List_Entries, MUIV_EveryTime,
            to, 4, MUIM_SetAsString, MUIA_Text_Contents,
            GetS(SWS_L_TopTitle), MUIV_TriggerValue);

   idata->SWA_AppBase_TopObj = GetTagObj(SWA_AppBase_TopObj, NULL, ti);

   if (idata->SWA_NPostList_Saved) {
      DoMethod(o, OM_ADDMEMBER,
               g = VGroup,
                  MUIA_Background, MUII_GroupBack,
                  Child, ColGroup(2),
                     Child, Label2(GetS(SWS_L_Subj)),
                     Child, s_Subj  = MkTO(),
                     Child, Label2(GetS(SWS_L_Grp)),
                     Child, s_Grp  = MkTO(),
                  End,
                  Child, HGroup,
                     MUIA_Group_SameSize, TRUE,
                     Child, b_Xfer   = MkBt(SWS_B_MoveToOut, SWS_H_MoveToOut),
                     Child, b_Del    = MkBt(SWS_B_Del,       SWS_H_Del),
                     Child, b_Edit   = MkBt(SWS_B_Edit,      SWS_H_Edit),
                     Child, b_SelAll = MkBt(SWS_B_SelAll,    SWS_H_SelAll),
                  End,
               End);

      s_SubjGAttr = MUIA_Text_Contents;
      s_GrpGAttr  = MUIA_Text_Contents;

      LDoM(o, idata, b_Edit, SWM_NPost_Edit, TRUE);

      DoMethod(idata->SWA_NList_LV, DCLK,
               o, 7, SWM_Root_ListDoMethod, idata->SWA_NList_L,
               SWV_ListDoMethod_Active, SWV_ListDoMethod_Entry, 2,
               SWM_NPost_Edit, TRUE);
   } else {
      DoMethod(o, OM_ADDMEMBER,
               g = VGroup,
                  MUIA_Background, MUII_GroupBack,
                  Child, ColGroup(2),
                     Child, Label2(GetS(SWS_L_Subj)),
                     Child, s_Subj  = StringObject,
                                        StringFrame,
                                        MUIA_CycleChain,        1,
                                        MUIA_HorizWeight,    5000,
                                        MUIA_String_MaxLen,  8192,
                                      End,
                     Child, Label2(GetS(SWS_L_Grp)),
                     Child, idata->GLPop = NewObject(NGListClass(), NULL,
                                                     SWA_AppBase_TopObj,
                                                       idata->SWA_AppBase_TopObj,
                                                     SWA_NGList_HelpL,
                                                       GetS(SWS_NG_H_Left),
                                                     SWA_NGList_HelpR,
                                                       GetS(SWS_NG_H_Right),
                                                     TAG_DONE),
                  End,
                  Child, HGroup,
                     MUIA_Group_SameSize, TRUE,
                     Child, b_Add         = MkBt(SWS_B_Add,       SWS_H_Add),
                     Child, b_Del         = MkBt(SWS_B_Del,       SWS_H_Del),
                     Child, b_Edit        = MkBt(SWS_B_Edit,      SWS_H_Edit),
                     Child, idata->b_Post = MkBt(SWS_B_Post,      SWS_H_Post),
                     Child, b_SelAll      = MkBt(SWS_B_SelAll,    SWS_H_SelAll),
                     Child, b_Xfer        = MkBt(SWS_B_MoveToSent,SWS_H_MoveToSent),
                  End,
               End);

                                      
      s_Grp  = SWGetObj(idata->GLPop, SWA_NGList_Str);

      LDoM(o, idata, b_Edit, SWM_NPost_Edit, FALSE);

      DoMethod(idata->SWA_NList_LV, DCLK,
               o, 7, SWM_Root_ListDoMethod, idata->SWA_NList_L,
               SWV_ListDoMethod_Active, SWV_ListDoMethod_Entry, 2,
               SWM_NPost_Edit, FALSE);
   }

   s_SubjAttr  = SWA_NPost_Subj;
   s_GrpAttr   = SWA_NPost_Grp;
   
   if (!g) return FAILURE;

   DoMethod(b_SelAll, NOTP, idata->SWA_NList_L, 4,
            MUIM_List_Select, MUIV_List_Select_All, MUIV_List_Select_On, NULL);

   DoMethod(b_Xfer, NOTP, o, 1, SWM_NPostList_XferSel);
   
   if (b_Add) {
      DoMethod(b_Add,   NOTP, o, 2, SWM_NList_Add, NULL);
      DoMethod(b_Add,   NOTP, MUIV_Notify_Window, 3,
               MUIM_Set, MUIA_Window_ActiveObject, s_Subj);
   }

   LDoM(o, idata, b_Del, SWM_NPost_Delete, 0);
   DoMethod(b_Del,   NOTP, o, 1, SWM_NList_RemoveSel);

   if (idata->b_Post) {
      DoMethod(idata->b_Post, NOTP, o, 1, SWM_NPostList_Post);
   }

   if (s_Subj) {
      SetAttrs(s_Subj,
               MUIA_Disabled,              TRUE,
               MUIA_String_AttachedList,   idata->SWA_NList_LV,
               TAG_DONE);
   }

   if (s_Grp) {
      SetAttrs(s_Grp,
               MUIA_Disabled,              TRUE,
               MUIA_String_AttachedList,   idata->SWA_NList_LV,
               TAG_DONE);
   }

   setlent(o, SWA_ObjNoChildCopy, TRUE);

   DoMethod(o, SWM_NPostList_OnOffLine,
            SWGetUL(NN_TCPList(idata), SWA_NTCPList_Online));

   DoMethod(NN_TCPList(idata), MUIM_Notify, SWA_NTCPList_Online,
            MUIV_EveryTime, o,2,SWM_NPostList_OnOffLine, MUIV_TriggerValue);

   DoMethod(o, MUIM_Notify, MUIA_AppMessage, MUIV_EveryTime,
            o, 2, SWM_NPostList_AppMessage, MUIV_TriggerValue);

   return SUCCESS;
}
コード例 #25
0
ファイル: MYTEST2Doc.cpp プロジェクト: ygangw/MIProcessor
void CMYTEST2Doc::ToSmall()
{     
	Size GetS(Dst.cols/2,Dst.rows/2);
	SizeSelect(GetS);
}
コード例 #26
0
ファイル: Grid.cpp プロジェクト: humeaua/Sudoku
void Grid::Print()
{
    //  Method to print the grid in the console
    std::cout << std::endl;
    //  1st row
    std::cout << GetNO().GetNO() << " " << GetNO().GetN() << " " << GetNO().GetNE() << " " << GetN().GetNO() << " " << GetN().GetN() << " " << GetN().GetNE() << " " << GetNE().GetNO() << " " << GetNE().GetN() << " " << GetNE().GetNE() << std::endl;
    //  2nd row
    std::cout << GetNO().GetO() << " " << GetNO().GetC() << " " << GetNO().GetE() << " " << GetN().GetO() << " " << GetN().GetC() << " " << GetN().GetE() << " " << GetNE().GetO() << " " << GetNE().GetC() << " " << GetNE().GetE() << std::endl;
    //  3rd row
    std::cout << GetNO().GetSO() << " " << GetNO().GetS() << " " << GetNO().GetSE() << " " << GetN().GetSO() << " " << GetN().GetS() << " " << GetN().GetSE() << " " << GetNE().GetSO() << " " << GetNE().GetS() << " " << GetNE().GetSE() << std::endl;
    
    //  4th row
    std::cout << GetO().GetNO() << " " << GetO().GetN() << " " << GetO().GetNE() << " " << GetC().GetNO() << " " << GetC().GetN() << " " << GetC().GetNE() << " " << GetE().GetNO() << " " << GetE().GetN() << " " << GetE().GetNE() << std::endl;
    //  5th row
    std::cout << GetO().GetO() << " " << GetO().GetC() << " " << GetO().GetE() << " " << GetC().GetO() << " " << GetC().GetC() << " " << GetC().GetE() << " " << GetE().GetO() << " " << GetE().GetC() << " " << GetE().GetE() << std::endl;
    //  6th row
    std::cout << GetO().GetSO() << " " << GetO().GetS() << " " << GetO().GetSE() << " " << GetC().GetSO() << " " << GetC().GetS() << " " << GetC().GetSE() << " " << GetE().GetSO() << " " << GetE().GetS() << " " << GetE().GetSE() << std::endl;
    
    //  7th row
    std::cout << GetSO().GetNO() << " " << GetSO().GetN() << " " << GetSO().GetNE() << " " << GetS().GetNO() << " " << GetS().GetN() << " " << GetS().GetNE() << " " << GetSE().GetNO() << " " << GetSE().GetN() << " " << GetSE().GetNE() << std::endl;
    //  8th row
    std::cout << GetSO().GetO() << " " << GetSO().GetC() << " " << GetSO().GetE() << " " << GetS().GetO() << " " << GetS().GetC() << " " << GetS().GetE() << " " << GetSE().GetO() << " " << GetSE().GetC() << " " << GetSE().GetE() << std::endl;
    //  9th row
    std::cout << GetSO().GetSO() << " " << GetSO().GetS() << " " << GetSO().GetSE() << " " << GetS().GetSO() << " " << GetS().GetS() << " " << GetS().GetSE() << " " << GetSE().GetSO() << " " << GetSE().GetS() << " " << GetSE().GetSE() << std::endl;
    
    std::cout << std::endl;
}
コード例 #27
0
ファイル: Grid.cpp プロジェクト: humeaua/Sudoku
Column Grid::Col4()
{
    ColumnHolder sH = GetN().LeftColumn(), sC = GetC().LeftColumn(), sB = GetS().LeftColumn();
    return Column(sH, sC, sB);
}
コード例 #28
0
ファイル: CRecord.cpp プロジェクト: wangxingfred/SheetX
	//////////////////////////////////////////////////////////////////////////
	// ½Å±¾½Ó¿Ú
	const tchar* CRecord::Name() const
	{
		return m_pSheet->HasNameCol() ? GetS(1) : NULL;
	}
コード例 #29
0
GFXSphereVertexList::GFXSphereVertexList( float radius, int detail, bool Insideout, bool reverse_normals )
{
    this->radius = radius;
    radius = 100000.0f;
    static vector< GFXVertexList* >vlists[4];
    int which = (Insideout ? 1 : 0)+(reverse_normals ? 2 : 0);
    while ( detail >= static_cast<int>(vlists[which].size()) )
        vlists[which].insert( vlists[which].end(), 1+detail-vlists[which].size(), NULL );
    if (vlists[which][detail] == 0) {
        int slices;
        int stacks = slices = detail;
        if (stacks > 12) {
            stacks -= 4;
            slices -= 4;
        } else {
            stacks -= 2;
            slices -= 2;
        }
        float rho_max   = 3.1415926536f;
        float rho_min   = 0.0f;
        float theta_min = 0.0f;
        float theta_max = 2.0f*3.1415926536f;
        float drho, dtheta;
        float x, y, z, tx, ty;
        float s, t, ds, dt;
        int   i, j, imin, imax;
        float nsign = Insideout ? -1.0 : 1.0;
        float normalscale = reverse_normals ? -1.0 : 1.0;
        int   fir   = 0;       //Insideout?1:0;
        int   sec   = 1;       //Insideout?0:1;
        /* Code below adapted from gluSphere */
        drho   = (rho_max-rho_min)/(float) stacks;
        dtheta = (theta_max-theta_min)/(float) slices;

        ds     = 1.0f/slices;
        dt     = 1.0f/stacks;
        t = 1.0f;               /* because loop now runs from 0 */

        imin   = 0;
        imax   = stacks;

        int  numQuadstrips   = stacks;
        //numQuadstrips = 0;
        int *QSOffsets       = new int[numQuadstrips];

        //draw intermediate stacks as quad strips
        int  numvertex       = stacks*(slices+1)*2;
        GFXVertex     *vertexlist = new GFXVertex[numvertex];

        GFXVertex     *vl    = vertexlist;
        enum POLYTYPE *modes = new enum POLYTYPE[numQuadstrips];
        /*   SetOrientation(Vector(1,0,0),
         *    Vector(0,0,-1),
         *    Vector(0,1,0));//that's the way prop*/                                                                          //taken care of in loading

        float rhol[2];
        float thetal[2];
#define g_rho( i ) ((rhol[((i))&1]))
#define g_theta( i ) ((thetal[((i))&1]))

        g_rho( 0 ) = rho_min;
        for (i = imin; i < imax; i++) {
            GFXVertex *vertexlist = vl+(i*(slices+1)*2);
            g_rho( i+1 ) = (i+1)*drho+rho_min; //FIXME These macros are horrible

            s = 0.0;
            g_theta( 0 ) = 0;
            for (j = 0; j <= slices; j++) {
                g_theta( j+1 ) = (j+1)*dtheta;

                tx = -sin( g_theta( j ) );
                ty = cos( g_theta( j ) );
                z  = sin( g_rho( i ) );
                x  = tx*z;
                y  = ty*z;
                z  = nsign*cos( g_rho( i ) );

                //normal
                vertexlist[j*2+fir].i  = x*normalscale;
                vertexlist[j*2+fir].k  = -y*normalscale;
                vertexlist[j*2+fir].j  = z*normalscale;

                //tangent
                vertexlist[j*2+fir].tx = -ty*normalscale;
                vertexlist[j*2+fir].tz = -tx*normalscale;
                vertexlist[j*2+fir].ty = 0;
                vertexlist[j*2+fir].tw = nsign*normalscale;
#define GetS( theta, theta_min, theta_max ) ( 1-(theta-theta_min)/(theta_max-theta_min) )
#define GetT( rho, rho_min, rho_max ) ( 1-(rho-rho_min)/(rho_max-rho_min) )

                //texcoords
                vertexlist[j*2+fir].s = GetS( g_theta( j ), theta_min, theta_max );                 //1-s;
                vertexlist[j*2+fir].t = GetT( g_rho( i ), rho_min, rho_max );                 //t;

                //position
                vertexlist[j*2+fir].x = x*radius;
                vertexlist[j*2+fir].z = -y*radius;
                vertexlist[j*2+fir].y = z*radius;

                z = sin( g_rho( i+1 ) );
                x = tx*z;
                y = ty*z;
                z = nsign*cos( g_rho( i+1 ) );

                //normal
                vertexlist[j*2+sec].i  = x*normalscale;
                vertexlist[j*2+sec].k  = -y*normalscale;
                vertexlist[j*2+sec].j  = z*normalscale;

                //tangent
                vertexlist[j*2+sec].tx = -ty*normalscale;
                vertexlist[j*2+sec].tz = -tx*normalscale;
                vertexlist[j*2+sec].ty = 0;
                vertexlist[j*2+sec].tw = nsign*normalscale;

                //texcoords
                vertexlist[j*2+sec].s  = GetS( g_theta( j ), theta_min, theta_max );                 //1-s;
                vertexlist[j*2+sec].t  = GetT( g_rho( i+1 ), rho_min, rho_max );                 //t - dt;

                //position
                vertexlist[j*2+sec].x  = x*radius;
                vertexlist[j*2+sec].z  = -y*radius;
                vertexlist[j*2+sec].y  = z*radius;

                s       += ds;
            }

            t           -= dt;
            QSOffsets[i] = (slices+1)*2;
            modes[i]     = GFXQUADSTRIP;
        }

#undef g_rho
#undef g_theta

        vlists[which][detail] = new GFXVertexList( modes, numvertex, vertexlist, numQuadstrips, QSOffsets );
    }
    sphere        = vlists[which][detail];
    numVertices   = sphere->numVertices;
    numlists      = sphere->numlists;
    data.vertices = sphere->data.vertices;
    index.i       = sphere->index.i;
    display_list  = sphere->display_list;
    vbo_data      = sphere->vbo_data;
    mode          = sphere->mode;
    offsets       = sphere->offsets;
}