• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ FrmGetObjectIndex函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中FrmGetObjectIndex函数的典型用法代码示例。如果您正苦于以下问题:C++ FrmGetObjectIndex函数的具体用法?C++ FrmGetObjectIndex怎么用?C++ FrmGetObjectIndex使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了FrmGetObjectIndex函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: SetPeople

static void SetPeople( Short num ) {
    Int x;
    Boolean found = false;
    FormPtr frm;
    ControlPtr cPtr;
    Word oIdx;

    frm = FrmGetActiveForm();

    x = MaxPlayers - 1;

    while( ( x > ( MaxPlayers - (num + 1) ) ) &&
            !found ) {
        oIdx = FrmGetObjectIndex( frm, pbtnVal[x--] );
        cPtr = FrmGetObjectPtr( frm, oIdx );

        if( CtlGetValue( cPtr ) ) {
            CtlSetValue( cPtr, false );
            found = true;
        }
    }

    if ( found ) {
        stor.tmpcomputers = MaxPlayers - (num + 1);
        oIdx = FrmGetObjectIndex( frm, cbtnVal[stor.tmpcomputers] );
        cPtr = FrmGetObjectPtr( frm, oIdx );
        CtlSetValue( cPtr, true);
    }
}
开发者ID:docwhat,项目名称:cwimp,代码行数:29,代码来源:draw.c


示例2: ResidentBrowseFormFieldChanged

static Boolean ResidentBrowseFormFieldChanged(AppContext* appContext, FormType* form, EventType* event)
{
    char *      word;
    UInt32      newSelectedWord=0;
    FieldType * field;
    ListType *  list;
    UInt16      index=FrmGetObjectIndex(form, fieldWord);

    Assert(index!=frmInvalidObjectId);
    field=(FieldType*)FrmGetObjectPtr(form, index);
    Assert(field);
    index=FrmGetObjectIndex(form, listMatching);
    Assert(index!=frmInvalidObjectId);
    list=(ListType*)FrmGetObjectPtr(form, index);
    Assert(list);
    word=FldGetTextPtr(field);
    // TODO: get length of the word via FldGetTextLength()
    if (word && *word)
        newSelectedWord = dictGetFirstMatching(GetCurrentFile(appContext), word);
    if (appContext->selectedWord != newSelectedWord)
    {
        appContext->selectedWord = newSelectedWord;
        Assert(appContext->selectedWord < appContext->wordsCount);
        LstSetSelectionMakeVisibleEx(appContext, list, appContext->selectedWord);
    }
    return true;
}
开发者ID:kjk,项目名称:noah-palm,代码行数:27,代码来源:resident_browse_form.c


示例3: SetComputers

static void SetComputers( Short num ) {
    FormPtr frm;
    ControlPtr cPtr;
    Word oIdx;

    if( num > (MaxPlayers - 1) || num < 0 ) {
        ErrNonFatalDisplayIf( true, "SetComputers: Out of Bounds");
        return;
    }

    if( stor.tmpcomputers == num ) {
        return;
    }

    frm = FrmGetActiveForm();


    /* Unset the old one */
    oIdx = FrmGetObjectIndex( frm, cbtnVal[stor.tmpcomputers] );
    cPtr = FrmGetObjectPtr( frm, oIdx );
    CtlSetValue( cPtr, false );

    /* Set new one */
    oIdx = FrmGetObjectIndex( frm, cbtnVal[num] );
    cPtr = FrmGetObjectPtr( frm, oIdx );
    CtlSetValue( cPtr, true );

    stor.tmpcomputers = num;

    if( stor.tmpcomputers + stor.tmpplayers > MaxPlayers ) {
        SetPlayers( MaxPlayers - stor.tmpcomputers );
    }

    return;
}
开发者ID:docwhat,项目名称:cwimp,代码行数:35,代码来源:draw.c


示例4: UserCredentialsFormHandleEvent

static Boolean UserCredentialsFormHandleEvent(EventType* event)
{
    switch (event->eType)
    {
        case ctlSelectEvent:
            DMSG("UserCredentialsFormHandleEvent(): ctlSelectEvent"); DENDL;
            if (okButton == event->data.ctlSelect.controlID)
            {
                FormType* form = FrmGetFormPtr(userCredentialsForm);
                UInt16 emailIndex = FrmGetObjectIndex(form, emailField);
                UInt16 passwordIndex = FrmGetObjectIndex(form, passwordField);
                const char* email = FldGetTextPtr((FieldType*)FrmGetObjectPtr(form, emailIndex));
                const char* password = FldGetTextPtr((FieldType*)FrmGetObjectPtr(form, passwordIndex));

                if (NULL == email || 0 == StrLen(email))
                {
                    FrmSetFocus(form, emailIndex);
                    return true;
                }
                if (NULL == password || 0 == StrLen(password))
                {
                    FrmSetFocus(form, passwordIndex);
                    return true;
                }
            }
            return false;

        default:
            return false;
    }
}
开发者ID:kjk,项目名称:moriarty-palm,代码行数:31,代码来源:FlickrImpl.cpp


示例5: UserCredentialsFormValidate

static void UserCredentialsFormValidate(FormType* form, FlickrPrefs& prefs)
{
    const char* email = FldGetTextPtr((FieldType*)FrmGetObjectPtr(form, FrmGetObjectIndex(form, emailField)));
    const char* password = FldGetTextPtr((FieldType*)FrmGetObjectPtr(form, FrmGetObjectIndex(form, passwordField)));
    StrCopy(prefs.email, email);
    StrCopy(prefs.password, password);
}
开发者ID:kjk,项目名称:moriarty-palm,代码行数:7,代码来源:FlickrImpl.cpp


示例6: prefs_save_checkboxes_1

static Boolean prefs_save_checkboxes_1()
{
  FormPtr frm;
  ControlPtr checkbox;
  Boolean val, dirty = false;
  frm = FrmGetActiveForm();

  checkbox = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, check_prf_4));
  my_prefs.sound = (CtlGetValue(checkbox) != 0);

  // Inverted background:
  checkbox = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, check_prf_13));
  val = (CtlGetValue(checkbox) != 0);
  if (my_prefs.black_bg != val)
    dirty = true;
  my_prefs.black_bg = val;

  // Color:
  checkbox = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, check_prf_14));
  val = (CtlGetValue(checkbox) != 0);
  if (my_prefs.color_on != val)
    dirty = true;
  my_prefs.color_on = val;
  return dirty;
}
开发者ID:BackupTheBerlios,项目名称:paleohack,代码行数:25,代码来源:form_prefs.c


示例7: DetailsFormInit

/* Initialize the details form */
static void DetailsFormInit( void )
{
    FormType*   detailsForm;
    FieldType*  urlField;
    UInt16      reference;

    detailsForm = FrmGetFormPtr( frmDetails );
    urlField    = GetObjectPtr( frmDetailsLink );
    reference   = GetHistoryCurrent();

    if ( AddURLToField( urlField, reference ) )
        FrmShowObject( detailsForm, FrmGetObjectIndex( detailsForm,
                                        frmDetailsCopy ) );
    else
        FrmHideObject( detailsForm, FrmGetObjectIndex( detailsForm,
                                        frmDetailsCopy ) );
    FrmDrawForm( detailsForm );

    AddDocNameTitle( Prefs()->docName );

    CtlSetValue( GetObjectPtr( frmDetailsStatusRead ),
        LinkVisited( reference ) );
    CtlSetValue( GetObjectPtr( frmDetailsStatusUnread ),
        ! LinkVisited( reference ) );
    CtlSetValue( GetObjectPtr( frmDetailsShowImages ),
        ShowImages( reference ) );
}
开发者ID:TimofonicJunkRoom,项目名称:plucker-1,代码行数:28,代码来源:detailsform.c


示例8: SetTimeTriggers

/***********************************************************************
 *
 * FUNCTION:    SetTimeTriggers
 *
 * DESCRIPTION: This routine sets the text label of the start time and
 *              end time triggers.
 *
 * PARAMETERS:  startTime	    - pointer to TimeType
 *              endTime        - pointer to TimeType
 *              startTimeText  - buffer that holds start time string
 *              emdTimeText    - buffer that holds end time string
 *              timeFormat     - time format
 *              untimed  	    - true if there isn't a time.
 *
 * RETURNED:	 nothing
 *
 * REVISION HISTORY:
 *			Name	Date		Description
 *			----	----		-----------
 *			art	4/4/96	Initial Revision
 *
 ***********************************************************************/
static void SetTimeTriggers (TimeType startTime, TimeType endTime,
		Char * startTimeText, Char * endTimeText, 
		TimeFormatType timeFormat, Boolean untimed)
	{

	FormType *		frm;
	ControlPtr 	startTimeCtl, endTimeCtl;

	frm = FrmGetActiveForm ();
	startTimeCtl = FrmGetObjectPtr (frm, FrmGetObjectIndex (frm, TimeSelectorStartTimeButton));
	endTimeCtl = FrmGetObjectPtr (frm, FrmGetObjectIndex (frm, TimeSelectorEndTimeButton));

	if (! untimed)
		{
		TimeToAscii (startTime.hours, startTime.minutes, timeFormat, startTimeText);
		TimeToAscii (endTime.hours, endTime.minutes, timeFormat, endTimeText);
		}
	else
		{
		// copy two spaces into these fields instead of just a null
		// because controls with empty strings (or one space) cause old-style
		// graphic control behavior, which uses the wrong colors!
		StrCopy(startTimeText, "  ");
		StrCopy(endTimeText, "  ");
		}
		
	CtlSetLabel (startTimeCtl, startTimeText);
	CtlSetLabel(endTimeCtl, endTimeText);
	}
开发者ID:kernelhcy,项目名称:hcyprojects,代码行数:51,代码来源:SelTime.c


示例9: ShowSelectWordTapIcon

/* Indicate that the next tap looks things up in the selected word */
static void ShowSelectWordTapIcon( void )
{
    FormType* mainForm;
    UInt16    prevCoordSys;

    if ( Prefs()->toolbar == TOOLBAR_NONE )
        return;

    mainForm = FrmGetFormPtr( GetMainFormId() );
    prevCoordSys = PalmSetCoordinateSystem( STANDARD );

    if ( Prefs()->toolbar == TOOLBAR_SILK ) {
        /* FIXME: figure this out */
    }
    else {
        FrmHideObject( mainForm, FrmGetObjectIndex( mainForm, bmpWait ) );

        if ( isSelectWordTapMode ) {
            FrmHideObject( mainForm, FrmGetObjectIndex( mainForm, bmpHome ) );
            FrmShowObject( mainForm, FrmGetObjectIndex( mainForm, bmpLookup ) );
        }
        else {
            FrmHideObject( mainForm, FrmGetObjectIndex( mainForm, bmpLookup ) );
            FrmShowObject( mainForm, FrmGetObjectIndex( mainForm, bmpHome ) );
        }
    }
    PalmSetCoordinateSystem( prevCoordSys );
}
开发者ID:TimofonicJunkRoom,项目名称:plucker-1,代码行数:29,代码来源:control.c


示例10: FormPenDownEvent

static Boolean
FormPenDownEvent(EventType * e)
{
  FormPtr frm = FrmGetActiveForm ();
  UInt16 objIndex;
  RectangleType r;
  Boolean res = false;

  objIndex = FrmGetObjectIndex (frm, ID_EditorMidiKeysGadget);
  FrmGetObjectBounds (frm, objIndex, &r);
  if (RctPtInRectangle (e->screenX, e->screenY, &r)) {
    midikeys_tapped(&midikeys, e->screenX, e->screenY);
    res = true;
  }

  objIndex = FrmGetObjectIndex (frm, ID_EditorNoteListGadget);
  FrmGetObjectBounds (frm, objIndex, &r);
  if (RctPtInRectangle (e->screenX, e->screenY, &r)) {
    notelist_tapped(&notelist, e->screenX, e->screenY);
    res = true;
  }

  UpdateNoteProperties();

  return res;
}
开发者ID:asashnov,项目名称:palmano,代码行数:26,代码来源:editor_form.c


示例11: FrmHideObject

/* A game of Hide and go Seek er, Show? */
static void HideNShow
    (
    UInt16 hideThis,
    UInt16 andThis,
    UInt16 butShowThis
    )
{
    FrmHideObject( form, FrmGetObjectIndex( form, hideThis ) );
    FrmHideObject( form, FrmGetObjectIndex( form, andThis ) );
    FrmShowObject( form, FrmGetObjectIndex( form, butShowThis ) );
}
开发者ID:TimofonicJunkRoom,项目名称:plucker,代码行数:12,代码来源:form.c


示例12: init_lists

static void init_lists(Short rw, Short ws)
{
  FormPtr frm;
  ListPtr lst;
  frm = FrmGetActiveForm();
  /* set initial settings for lists */
  lst = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, list_prf_1));
  LstSetSelection(lst, ws-1);
  lst = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, list_prf_2));
  LstSetSelection(lst, rw-1);
}
开发者ID:BackupTheBerlios,项目名称:paleohack,代码行数:11,代码来源:form_prefs.c


示例13: widgets

/**********************************************************************
                       UPDATE_FIELD_SCROLLERS
 IN:
 frm, fld, up_scroller, down_scroller = various UI doodads
 OUT:
 nothing
 PURPOSE:
 Update the given scroller widgets (for the given field 
 (in the given form)), according to whether the field is scrollable
 in the "up" and "down" directions.
 **********************************************************************/
void update_field_scrollers(FormPtr frm, FieldPtr fld,
			    Word up_scroller, Word down_scroller) 
{
  Boolean u, d;
  u = FldScrollable(fld, winUp);
  d = FldScrollable(fld, winDown);
  FrmUpdateScrollers(frm, 
		     FrmGetObjectIndex(frm, up_scroller),
		     FrmGetObjectIndex(frm, down_scroller),
		     u, d);
  return;
}
开发者ID:BackupTheBerlios,项目名称:paleohack,代码行数:23,代码来源:util.c


示例14: RulesSetScrolling

static void
RulesSetScrolling (void)
{
    FieldPtr	    field;

    field = FrmGetObjectPtr (rulesFrm, FrmGetObjectIndex (rulesFrm, rulesText));
    FrmUpdateScrollers (rulesFrm,
                        FrmGetObjectIndex (rulesFrm, rulesScrollUp),
                        FrmGetObjectIndex (rulesFrm, rulesScrollDown),
                        FldScrollable (field, winUp),
                        FldScrollable (field, winDown));
}
开发者ID:ricochet-robotics,项目名称:rr-palmpilot-c,代码行数:12,代码来源:main.c


示例15: init_checkboxes_1

static void init_checkboxes_1()
{
  FormPtr frm;
  ControlPtr checkbox;
  frm = FrmGetActiveForm();

  checkbox = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, check_prf_4));
  CtlSetValue(checkbox, (my_prefs.sound ? 1 : 0));
  checkbox = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, check_prf_13));
  CtlSetValue(checkbox, (my_prefs.black_bg ? 1 : 0));
  checkbox = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, check_prf_14));
  CtlSetValue(checkbox, (my_prefs.color_on ? 1 : 0));
}
开发者ID:BackupTheBerlios,项目名称:paleohack,代码行数:13,代码来源:form_prefs.c


示例16: ThumbnailDetailViewLoadGadgets

/***********************************************************************
 *
 * FUNCTION:    ThumbnailDetailViewLoadGadgets
 *
 * DESCRIPTION: This routine loads sketches into the thumbnail view form
 *              thumbnail gadgets.
 *
 * PARAMETERS:  recordNum index of the first record to display.
 *
 * RETURNED:    nothing
 *
 ***********************************************************************/
static void ThumbnailDetailViewLoadGadgets(FormType* frm) {
  UInt16 row;
  MemHandle recordH;
  DynamicButtonType* btnThumb, *btnName, *btnNameMasked, *btnAlarm;
  MemPtr ptr;
  UInt16 attr;
  Char* record_name, *record_note;
  DiddleBugRecordType record;
  FontID font;
  UInt32 alarmSecs;
  UInt16 recordNum = d.top_visible_record;
  const UInt16 max = Min(recordsPerPage, d.records_in_cat - d.top_row_pos_in_cat);
  Boolean private = false;

  for (row = 0; row < max; row++) {
    /* Get the next record in the current category. */
    recordH = DmQueryNextInCategory (d.dbR, &recordNum, p.category);

    if(row == 0) {
      /* store the position of the first row so we can use */
      /* d.top_row_pos_in_cat+row when drawing             */
      d.top_row_pos_in_cat = recordH ? DmPositionInCategory(d.dbR, recordNum, p.category) : 0;
    }

    btnThumb = (DynamicButtonType*) FrmGetGadgetData(frm, FrmGetObjectIndex(frm, Thumb1 + row));
    btnName = (DynamicButtonType*) FrmGetGadgetData(frm, FrmGetObjectIndex(frm, Thumb1Name + row));
    btnNameMasked = (DynamicButtonType*) FrmGetGadgetData(frm, FrmGetObjectIndex(frm, Thumb1NameMasked + row));
    btnAlarm = (DynamicButtonType*) FrmGetGadgetData(frm, FrmGetObjectIndex(frm, Thumb1Alarm + row));

    /* Store record number */
    btnThumb->value = recordNum;
    btnName->value = recordNum;
    btnNameMasked->value = recordNum;
    btnAlarm->value = recordNum;

    /* Clear old internal values */
    btnThumb->selected = false;

    /* Read record attributes */
    DmRecordInfo(d.dbR, recordNum, &attr, NULL, NULL);
    private = attr & dmRecAttrSecret && d.privateRecordStatus == maskPrivateRecords;
    
    /* Get a pointer to the record */
    ptr = MemHandleLock(recordH);

    if (private) {
      DrawMaskedRecord(btnThumb->content.bmpW, maskPattern);
    } else {
开发者ID:jemyzhang,项目名称:DiddleBug,代码行数:60,代码来源:thumbnails_details.c


示例17: GetObjectPtr

void * GetObjectPtr(UInt16 objectID)
{
	FormType * frmP;

	frmP = FrmGetActiveForm();
	return FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP, objectID));
}
开发者ID:CocoaBob,项目名称:ZDic,代码行数:7,代码来源:ZDicTools.c


示例18: SelectTo

static void SelectTo()
{
	FormPtr frmP = FrmGetActiveForm();
	if (FormIsNot(frmP, FormReply)) return;
	
	SendPref pref;
	ReadSendPreference(pref);
	
	if (pref.useFingerAddress) {
		if (FasSearchAvailable()) {
			SelectUsingFingerAddr();
			return;
		}
	}

	FieldPtr fieldTo = (FieldPtr) GetObjectPtr(frmP, FieldTo);
	FldSetSelection(fieldTo, 0, StrLen(FldGetTextPtr(fieldTo)));

	AddrLookupParamsType params;
	MemSet(&params, sizeof(AddrLookupParamsType), 0);
	params.formatStringP = "^mobile";
	params.field1 = addrLookupSortField;
	params.field2 = addrLookupMobile;
	params.field2Optional = false;
	params.userShouldInteract = true;

	PhoneNumberLookupCustom (fieldTo, &params, true);
	FrmSetFocus(frmP, FrmGetObjectIndex(frmP, FieldCompose));
}
开发者ID:oldhu,项目名称:smstw,代码行数:29,代码来源:SMSReply.cpp


示例19: GadgetTimeSetRect

void
GadgetTimeSetRect(RectangleType *rect, TimeType begin, TimeType end, UInt8 day, UInt8 num_times, UInt8 pos)
{
  UInt8 top, height, width, width_base;
  RectangleType bounds;
  UInt16 gadgetIndex = FrmGetObjectIndex(gForm, gGadgetID);

  FrmGetObjectBounds(gForm, gadgetIndex, &bounds);

  height = GadgetCalcTimeHeight(begin, end);
  top = GadgetCalcTimeTop(begin);

  if ( (top + height) > GADGET_MAX_PIXELHEIGHT)
    height -= ((top + height) - GADGET_MAX_PIXELHEIGHT);

  width = gGadgetDaysWidth / num_times;
  width_base = width;
  if (pos == (GADGET_MAX_AT_A_TIME-1)) {
    // It's the last item, add any pixels that get cut off by the division otherwise
    // (like: width: 20, num_items = 3, item width = 6, 2 got cut off, add them to the last entry)
    width += (gGadgetDaysWidth - (num_times * width));
  }

  RctSetRectangle(rect,
		  // Left          Left Offset                 Days to left          lines between days  position offset
		  bounds.topLeft.x+GADGET_BASELEFT+GADGET_LEFT+(gGadgetDaysWidth*day)+day              + pos * width_base,
		  // Top           Top Offset      hours
		  bounds.topLeft.y+GADGET_TOP +top,
		  // Width
		  width,
		  // 2px per 15min
		  height);

}
开发者ID:timn,项目名称:unimatrix,代码行数:34,代码来源:gadget.c


示例20: GetObjectPtr

static VoidPtr GetObjectPtr (Word objID) {
    FormPtr frm;

    frm = FrmGetActiveForm();

    return (FrmGetObjectPtr (frm, FrmGetObjectIndex (frm, objID)));
}
开发者ID:docwhat,项目名称:cwimp,代码行数:7,代码来源:draw.c



注:本文中的FrmGetObjectIndex函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FromHere函数代码示例发布时间:2022-05-30
下一篇:
C++ FrmGetActiveForm函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap