本文整理汇总了C++中ObjOf函数的典型用法代码示例。如果您正苦于以下问题:C++ ObjOf函数的具体用法?C++ ObjOf怎么用?C++ ObjOf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ObjOf函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: setCDKAlphalistContents
/*
* This function sets the information inside the file selector.
*/
void setCDKAlphalistContents (CDKALPHALIST *alphalist, char *list[], int listSize)
{
/* Declare local variables. */
CDKSCROLL *scrollp = (CDKSCROLL *)alphalist->scrollField;
CDKENTRY *entry = (CDKENTRY *)alphalist->entryField;
int x;
freeCharList (alphalist->list, alphalist->listSize);
/* We need to sort the list before we use it. */
sortList (list, listSize);
/* Copy in the new information. */
alphalist->listSize = listSize;
for (x=0; x < listSize; x++)
{
alphalist->list[x] = copyChar (list[x]);
}
/* Set the information in the scrolling list. */
setCDKScroll (scrollp, list, listSize, NONUMBERS, scrollp->highlight, ObjOf(scrollp)->box);
/* Clean out the entry field. */
cleanCDKEntry (entry);
/* Redraw the alphalist. */
eraseCDKAlphalist (alphalist);
drawCDKAlphalist (alphalist, ObjOf(alphalist)->box);
}
开发者ID:dyne,项目名称:MuSE,代码行数:32,代码来源:alphalist.c
示例2: injectCDKEntry
/*
* This injects a single character into the file selector.
*/
char *injectCDKFselect (CDKFSELECT *fselect, chtype input)
{
/* Declare local variables. */
char *filename;
boolean file;
/* Let the user play. */
filename = injectCDKEntry (fselect->entryField, input);
/* Copy the entry field exitType to the fileselector. */
fselect->exitType = fselect->entryField->exitType;
/* If we exited early, make sure we don't interpret it as a file. */
if (fselect->exitType == vEARLY_EXIT)
{
return 0;
}
/* Can we change into the directory? */
file = chdir (filename);
chdir (fselect->pwd);
/* If it's not a directory, return the filename. */
if (file != 0)
{
/* It's a regular file, create the full path. */
fselect->pathname = copyChar (filename);
/* Return the complete pathname. */
return (fselect->pathname);
}
else
{
/* Set the file selector information. */
setCDKFselect (fselect, filename,
fselect->fieldAttribute, fselect->fillerCharacter,
fselect->highlight,
fselect->dirAttribute, fselect->fileAttribute,
fselect->linkAttribute, fselect->sockAttribute,
ObjOf(fselect)->box);
/* Redraw the scrolling list. */
drawCDKScroll (fselect->scrollField, ObjOf(fselect->scrollField)->box);
}
/* Set the exit type and return a null pointer. */
fselect->exitType = vEARLY_EXIT;
return 0;
}
开发者ID:dyne,项目名称:MuSE,代码行数:52,代码来源:fselect.c
示例3: _drawCDKUScale
/*
* This function draws the widget.
*/
static void _drawCDKUScale (CDKOBJS *object, boolean Box)
{
CDKUSCALE *widget = (CDKUSCALE *)object;
/* Draw the shadow. */
if (widget->shadowWin != 0)
{
drawShadow (widget->shadowWin);
}
/* Box the widget if asked. */
if (Box)
{
drawObjBox (widget->win, ObjOf(widget));
}
drawCdkTitle (widget->win, object);
/* Draw the label. */
if (widget->labelWin != 0)
{
writeChtype (widget->labelWin, 0, 0,
widget->label,
HORIZONTAL, 0,
widget->labelLen);
wrefresh (widget->labelWin);
}
wrefresh (widget->win);
/* Draw the field window. */
drawCDKUScaleField (widget);
}
开发者ID:Chaduke,项目名称:bah.mod,代码行数:35,代码来源:uscale.c
示例4: popupLabelAttrib
/*
* This pops up a message.
*/
void popupLabelAttrib (CDKSCREEN *screen, char **mesg, int count, chtype attrib)
{
CDKLABEL *popup = 0;
int oldCursState;
boolean functionKey;
/* Create the label. */
popup = newCDKLabel (screen, CENTER, CENTER, mesg, count, TRUE, FALSE);
setCDKLabelBackgroundAttrib(popup, attrib);
oldCursState = curs_set(0);
/* Draw it on the screen. */
drawCDKLabel (popup, TRUE);
/* Wait for some input. */
keypad (popup->win, TRUE);
getchCDKObject (ObjOf(popup), &functionKey);
/* Kill it. */
destroyCDKLabel (popup);
/* Clean the screen. */
curs_set(oldCursState);
eraseCDKScreen (screen);
refreshCDKScreen (screen);
}
开发者ID:iamjamestl,项目名称:school,代码行数:29,代码来源:popup_label.c
示例5: _drawCDKFselect
/*
* This draws the file selector widget.
*/
static void _drawCDKFselect (CDKOBJS *object, boolean Box GCC_UNUSED)
{
CDKFSELECT *fselect = (CDKFSELECT *)object;
/* Draw in the shadow if we need to. */
if (fselect->shadowWin != 0)
{
drawShadow (fselect->shadowWin);
}
/* Draw in the entry field. */
drawCDKEntry (fselect->entryField, ObjOf(fselect->entryField)->box);
/* Draw in the scroll field. */
drawCDKScroll (fselect->scrollField, ObjOf(fselect->scrollField)->box);
}
开发者ID:dyne,项目名称:MuSE,代码行数:19,代码来源:fselect.c
示例6: _drawCDKAlphalist
/*
* This draws the file selector widget.
*/
static void _drawCDKAlphalist (CDKOBJS *obj, boolean Box GCC_UNUSED)
{
CDKALPHALIST * alphalist = (CDKALPHALIST *)obj;
/* Does this widget have a shadow? */
if (alphalist->shadowWin != 0)
{
drawShadow (alphalist->shadowWin);
}
/* Draw in the entry field. */
drawCDKEntry (alphalist->entryField, ObjOf(alphalist->entryField)->box);
/* Draw in the scroll field. */
drawCDKScroll (alphalist->scrollField, ObjOf(alphalist->scrollField)->box);
}
开发者ID:dyne,项目名称:MuSE,代码行数:19,代码来源:alphalist.c
示例7: removeCalendarMarkCB
/*
* This removes a marker from the calendar.
*/
static int removeCalendarMarkCB (EObjectType objectType GCC_UNUSED, void
*object, void *clientData, chtype key GCC_UNUSED)
{
CDKCALENDAR *calendar = (CDKCALENDAR *)object;
struct AppointmentInfo *appointmentInfo = (struct AppointmentInfo *)clientData;
int x;
/* Look for the marker in the list. */
for (x = 0; x < appointmentInfo->appointmentCount; x++)
{
if ((appointmentInfo->appointment[x].day == calendar->day) &&
(appointmentInfo->appointment[x].month == calendar->month) &&
(appointmentInfo->appointment[x].year == calendar->year))
{
freeChar (appointmentInfo->appointment[x].description);
appointmentInfo->appointment[x].description = 0;
break;
}
}
/* Remove the marker from the calendar. */
removeCDKCalendarMarker (calendar,
calendar->day,
calendar->month,
calendar->year);
/* Redraw the calendar. */
drawCDKCalendar (calendar, ObjOf (calendar)->box);
return (FALSE);
}
开发者ID:lavenliu,项目名称:linuxc,代码行数:33,代码来源:appointment.c
示例8: _drawCDKButton
/*
* This draws the button widget.
*/
static void _drawCDKButton (CDKOBJS *object, boolean Box GCC_UNUSED)
{
CDKBUTTON *button = (CDKBUTTON *)object;
/* Is there a shadow? */
if (button->shadowWin != (WINDOW *)NULL)
{
drawShadow (button->shadowWin);
}
/* Box the widget if asked. */
if (ObjOf (button)->box)
{
drawObjBox (button->win, ObjOf (button));
}
drawCDKButtonText (button);
wrefresh (button->win);
}
开发者ID:Chaduke,项目名称:bah.mod,代码行数:21,代码来源:button.c
示例9: activateCDKUScale
/*
* This allows the person to use the widget's data field.
*/
unsigned activateCDKUScale (CDKUSCALE *widget, chtype *actions)
{
unsigned ret;
/* Draw the widget. */
drawCDKUScale (widget, ObjOf(widget)->box);
if (actions == 0)
{
chtype input = 0;
boolean functionKey;
for (;;)
{
input = getchCDKObject (ObjOf(widget), &functionKey);
/* Inject the character into the widget. */
ret = injectCDKUScale (widget, input);
if (widget->exitType != vEARLY_EXIT)
{
return ret;
}
}
}
else
{
int length = chlen (actions);
int x = 0;
/* Inject each character one at a time. */
for (x=0; x < length; x++)
{
ret = injectCDKUScale (widget, actions[x]);
if (widget->exitType != vEARLY_EXIT)
{
return ret;
}
}
}
/* Set the exit type and return. */
setExitType(widget, 0);
return unknownUnsigned;
}
开发者ID:Chaduke,项目名称:bah.mod,代码行数:47,代码来源:uscale.c
示例10: activateCDKScroll
/*
* This actually does all the 'real' work of managing the scrolling list.
*/
int activateCDKScroll (CDKSCROLL *scrollp, chtype *actions)
{
/* Draw the scrolling list */
drawCDKScroll (scrollp, ObjOf (scrollp)->box);
if (actions == 0)
{
chtype input;
boolean functionKey;
int ret;
for (;;)
{
fixCursorPosition (scrollp);
input = (chtype)getchCDKObject (ObjOf (scrollp), &functionKey);
/* Inject the character into the widget. */
ret = injectCDKScroll (scrollp, input);
if (scrollp->exitType != vEARLY_EXIT)
{
return ret;
}
}
}
else
{
int length = chlen (actions);
int i = 0;
int ret;
/* Inject each character one at a time. */
for (i = 0; i < length; i++)
{
ret = injectCDKScroll (scrollp, actions[i]);
if (scrollp->exitType != vEARLY_EXIT)
return ret;
}
}
/* Set the exit type for the widget and return. */
setExitType (scrollp, 0);
return -1;
}
开发者ID:Chaduke,项目名称:bah.mod,代码行数:46,代码来源:scroll.c
示例11: activateCDKDialog
/*
* This lets the user select the button.
*/
int activateCDKDialog (CDKDIALOG *dialog, chtype *actions)
{
/* Declare local variables. */
chtype input = 0;
int ret;
/* Draw the dialog box. */
drawCDKDialog (dialog, ObjOf(dialog)->box);
/* Lets move to the first button. */
writeChtypeAttrib (dialog->win,
dialog->buttonPos[dialog->currentButton],
dialog->boxHeight-2,
dialog->buttonLabel[dialog->currentButton],
dialog->highlight,
HORIZONTAL,
0, dialog->buttonLen[dialog->currentButton]);
wrefresh (dialog->win);
/* Check if actions is null. */
if (actions == 0)
{
for (;;)
{
/* Get the input. */
input = wgetch (dialog->win);
/* Inject the character into the widget. */
ret = injectCDKDialog (dialog, input);
if (dialog->exitType != vEARLY_EXIT)
{
return ret;
}
}
}
else
{
int length = chlen (actions);
int x = 0;
/* Inject each character one at a time. */
for (x=0; x < length; x++)
{
ret = injectCDKDialog (dialog, actions[x]);
if (dialog->exitType != vEARLY_EXIT)
{
return ret;
}
}
}
/* Set the exit type and exit. */
dialog->exitType = vEARLY_EXIT;
return -1;
}
开发者ID:dyne,项目名称:MuSE,代码行数:58,代码来源:dialog.c
示例12: activateCDKButton
/*
* This was added for the builder.
*/
int activateCDKButton (CDKBUTTON *button, chtype *actions)
{
chtype input = 0;
boolean functionKey;
int ret;
drawCDKButton (button, ObjOf (button)->box);
if (actions == 0)
{
for (;;)
{
input = (chtype)getchCDKObject (ObjOf (button), &functionKey);
/* Inject the character into the widget. */
ret = injectCDKButton (button, input);
if (button->exitType != vEARLY_EXIT)
{
return ret;
}
}
}
else
{
int length = chlen (actions);
int x = 0;
/* Inject each character one at a time. */
for (x = 0; x < length; x++)
{
ret = injectCDKButton (button, actions[x]);
if (button->exitType != vEARLY_EXIT)
{
return ret;
}
}
}
/* Set the exit type and exit. */
setExitType (button, 0);
return -1;
}
开发者ID:Chaduke,项目名称:bah.mod,代码行数:45,代码来源:button.c
示例13: _moveCDKAlphalist
/*
* This moves the alphalist field to the given location.
*/
static void _moveCDKAlphalist (CDKOBJS *object, int xplace, int yplace, boolean relative, boolean refresh_flag)
{
CDKALPHALIST *alphalist = (CDKALPHALIST *)object;
/* Declare local variables. */
int currentX = getbegx(alphalist->win);
int currentY = getbegy(alphalist->win);
int xpos = xplace;
int ypos = yplace;
int xdiff = 0;
int ydiff = 0;
/*
* If this is a relative move, then we will adjust where we want
* to move to.
*/
if (relative)
{
xpos = getbegx(alphalist->win) + xplace;
ypos = getbegy(alphalist->win) + yplace;
}
/* Adjust the window if we need to. */
alignxy (WindowOf(alphalist), &xpos, &ypos, alphalist->boxWidth, alphalist->boxHeight);
/* Get the difference. */
xdiff = currentX - xpos;
ydiff = currentY - ypos;
/* Move the window to the new location. */
moveCursesWindow(alphalist->win, -xdiff, -ydiff);
/* If there is a shadow box we have to move it too. */
if (alphalist->shadowWin != 0)
{
moveCursesWindow(alphalist->shadowWin, -xdiff, -ydiff);
}
/* Move the sub-widgets. */
moveCDKEntry (alphalist->entryField, xplace, yplace, relative, FALSE);
moveCDKScroll (alphalist->scrollField, xplace, yplace, relative, FALSE);
/* Touch the windows so they 'move'. */
touchwin (WindowOf(alphalist));
wrefresh (WindowOf(alphalist));
/* Redraw the window, if they asked for it. */
if (refresh_flag)
{
drawCDKAlphalist (alphalist, ObjOf(alphalist)->box);
}
}
开发者ID:dyne,项目名称:MuSE,代码行数:55,代码来源:alphalist.c
示例14: _moveCDKFScale
/*
* This moves the scale field to the given location.
*/
static void _moveCDKFScale (CDKOBJS *object, int xplace, int yplace, boolean relative, boolean refresh_flag)
{
CDKFSCALE *scale = (CDKFSCALE *)object;
/* Declare local variables. */
int currentX = getbegx(scale->win);
int currentY = getbegy(scale->win);
int xpos = xplace;
int ypos = yplace;
int xdiff = 0;
int ydiff = 0;
/*
* If this is a relative move, then we will adjust where we want
* to move to.
*/
if (relative)
{
xpos = getbegx(scale->win) + xplace;
ypos = getbegy(scale->win) + yplace;
}
/* Adjust the window if we need to. */
alignxy (WindowOf(scale), &xpos, &ypos, scale->boxWidth, scale->boxHeight);
/* Get the difference. */
xdiff = currentX - xpos;
ydiff = currentY - ypos;
/* Move the window to the new location. */
moveCursesWindow(scale->win, -xdiff, -ydiff);
if (scale->labelWin != 0)
{
moveCursesWindow(scale->labelWin, -xdiff, -ydiff);
}
moveCursesWindow(scale->fieldWin, -xdiff, -ydiff);
/* If there is a shadow box we have to move it too. */
if (scale->shadowWin != 0)
{
moveCursesWindow(scale->shadowWin, -xdiff, -ydiff);
}
/* Touch the windows so they 'move'. */
touchwin (WindowOf(scale));
wrefresh (WindowOf(scale));
/* Redraw the window, if they asked for it. */
if (refresh_flag)
{
drawCDKFScale (scale, ObjOf(scale)->box);
}
}
开发者ID:dyne,项目名称:MuSE,代码行数:55,代码来源:fscale.c
示例15: _drawCDKMarquee
/*
* This draws the marquee widget on the screen.
*/
static void _drawCDKMarquee (CDKOBJS *object, boolean Box)
{
CDKMARQUEE *widget = (CDKMARQUEE *)object;
/* Keep the box information. */
ObjOf (widget)->box = Box;
/* Do we need to draw a shadow??? */
if (widget->shadowWin != 0)
{
drawShadow (widget->shadowWin);
}
/* Box it if needed. */
if (Box)
{
drawObjBox (widget->win, ObjOf (widget));
}
/* Refresh the window. */
wrefresh (widget->win);
}
开发者ID:iamjamestl,项目名称:school,代码行数:25,代码来源:marquee.c
示例16: setCDKAlphalistContents
/*
* This function sets the information inside the file selector.
*/
void setCDKAlphalistContents (CDKALPHALIST *widget, char **list, int listSize)
{
CDKSCROLL *scrollp = widget->scrollField;
CDKENTRY *entry = widget->entryField;
if (!createList (widget, list, listSize))
return;
/* Set the information in the scrolling list. */
setCDKScroll (scrollp,
widget->list,
widget->listSize,
NONUMBERS,
scrollp->highlight,
ObjOf (scrollp)->box);
/* Clean out the entry field. */
setCDKAlphalistCurrentItem (widget, 0);
cleanCDKEntry (entry);
/* Redraw the widget. */
eraseCDKAlphalist (widget);
drawCDKAlphalist (widget, ObjOf (widget)->box);
}
开发者ID:iamjamestl,项目名称:school,代码行数:27,代码来源:alphalist.c
示例17: _moveCDKScroll
/*
* This moves the scroll field to the given location.
*/
static void _moveCDKScroll (CDKOBJS *object,
int xplace,
int yplace,
boolean relative,
boolean refresh_flag)
{
/* *INDENT-EQLS* */
CDKSCROLL *scrollp = (CDKSCROLL *)object;
int currentX = getbegx (scrollp->win);
int currentY = getbegy (scrollp->win);
int xpos = xplace;
int ypos = yplace;
int xdiff = 0;
int ydiff = 0;
/*
* If this is a relative move, then we will adjust where we want
* to move to.
*/
if (relative)
{
xpos = getbegx (scrollp->win) + xplace;
ypos = getbegy (scrollp->win) + yplace;
}
/* Adjust the window if we need to. */
alignxy (WindowOf (scrollp), &xpos, &ypos, scrollp->boxWidth, scrollp->boxHeight);
/* Get the difference. */
xdiff = currentX - xpos;
ydiff = currentY - ypos;
/* Move the window to the new location. */
moveCursesWindow (scrollp->win, -xdiff, -ydiff);
moveCursesWindow (scrollp->listWin, -xdiff, -ydiff);
moveCursesWindow (scrollp->shadowWin, -xdiff, -ydiff);
moveCursesWindow (scrollp->scrollbarWin, -xdiff, -ydiff);
/* Touch the windows so they 'move'. */
refreshCDKWindow (WindowOf (scrollp));
/* Redraw the window, if they asked for it. */
if (refresh_flag)
{
drawCDKScroll (scrollp, ObjOf (scrollp)->box);
}
}
开发者ID:Chaduke,项目名称:bah.mod,代码行数:50,代码来源:scroll.c
示例18: setCDKButtonMessage
/*
* This sets the information within the button.
*/
void setCDKButtonMessage (CDKBUTTON *button, const char *info)
{
/* Clean out the old message. */
freeChtype (button->info);
button->infoPos = 0;
button->infoLen = 0;
/* Copy in the new message. */
button->info = char2Chtype (info, &button->infoLen, &button->infoPos);
button->infoPos = justifyString (button->boxWidth - 2 * BorderOf (button),
button->infoLen, button->infoPos);
/* Redraw the button widget. */
eraseCDKButton (button);
drawCDKButton (button, ObjOf (button)->box);
}
开发者ID:Chaduke,项目名称:bah.mod,代码行数:20,代码来源:button.c
示例19: _moveCDKScale
/*
* This moves the widget's data field to the given location.
*/
static void _moveCDKScale (CDKOBJS *object,
int xplace,
int yplace,
boolean relative,
boolean refresh_flag)
{
CDKSCALE *widget = (CDKSCALE *) object;
int currentX = getbegx (widget->win);
int currentY = getbegy (widget->win);
int xpos = xplace;
int ypos = yplace;
int xdiff = 0;
int ydiff = 0;
/*
* If this is a relative move, then we will adjust where we want
* to move to.
*/
if (relative)
{
xpos = getbegx (widget->win) + xplace;
ypos = getbegy (widget->win) + yplace;
}
/* Adjust the window if we need to. */
alignxy (WindowOf (widget), &xpos, &ypos, widget->boxWidth, widget->boxHeight);
/* Get the difference. */
xdiff = currentX - xpos;
ydiff = currentY - ypos;
/* Move the window to the new location. */
moveCursesWindow (widget->win, -xdiff, -ydiff);
moveCursesWindow (widget->labelWin, -xdiff, -ydiff);
moveCursesWindow (widget->fieldWin, -xdiff, -ydiff);
moveCursesWindow (widget->shadowWin, -xdiff, -ydiff);
/* Touch the windows so they 'move'. */
refreshCDKWindow (WindowOf (widget));
/* Redraw the window, if they asked for it. */
if (refresh_flag)
{
drawCDKScale (widget, ObjOf (widget)->box);
}
}
开发者ID:lavenliu,项目名称:linuxc,代码行数:49,代码来源:scale.c
示例20: activateCDKFScale
/*
* This allows the person to use the scale field.
*/
float activateCDKFScale (CDKFSCALE *scale, chtype *actions)
{
/* Declare local variables. */
float ret;
/* Draw the scale widget. */
drawCDKFScale (scale, ObjOf(scale)->box);
/* Check if actions is null. */
if (actions == 0)
{
chtype input = 0;
for (;;)
{
/* Get the input. */
input = wgetch (scale->fieldWin);
/* Inject the character into the widget. */
ret = injectCDKFScale (scale, input);
if (scale->exitType != vEARLY_EXIT)
{
return ret;
}
}
}
else
{
int length = chlen (actions);
int x = 0;
/* Inject each character one at a time. */
for (x=0; x < length; x++)
{
ret = injectCDKFScale (scale, actions[x]);
if (scale->exitType != vEARLY_EXIT)
{
return ret;
}
}
}
/* Set the exit type and return. */
scale->exitType = vEARLY_EXIT;
return -1;
}
开发者ID:dyne,项目名称:MuSE,代码行数:48,代码来源:fscale.c
注:本文中的ObjOf函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论