/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1997, by Sun Mircrosystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.12 */
/*LINTLIBRARY*/
#include "private.h"
void
{
chtype c;
int i;
/* Display the mark region of the item */
if (!Selectable(k)) {
for (i = Marklen(m); i > 0; i--) {
}
} else {
} else {
}
/* Display the mark */
if (Marklen(m)) {
}
} else {
for (i = Marklen(m); i > 0; i--) {
}
}
}
/* Display the name */
c = Pad(m);
} else {
c = ' ';
}
}
/* Display the description */
if (DescriptionLen(k) != 0) {
}
for (i = MaxDesc(m) - DescriptionLen(k); i > 0; i--) {
}
}
if (foreon) {
}
if (backon) {
}
if (greyon) {
}
}
void
{
_post_item(m, k);
}
int
{
if (!m) {
return (E_BAD_ARGUMENT);
}
if (Indriver(m)) {
return (E_BAD_STATE);
}
if (!Posted(m)) {
return (E_NOT_POSTED);
}
Iterm(m);
Mterm(m);
ResetPost(m);
return (E_OK);
}
/*
* This routine draws the item indicated by oldcur first and then
* draws the item indicated by Current. This will have the affect
* of unselecting the first item and selecting the next.
*/
void
{
_move_post_item(m, oldcur);
_move_post_item(m, Current(m));
}
}
/*
* Draw the entire menu into the super window
* This routine assumes all items have been linked and
* that the menu is in at least a pre-post state.
*/
void
{
int k;
ITEM *i, *j;
k = 0; /* Line number */
i = IthItem(m, 0);
do {
j = i;
do {
_post_item(m, j);
}
} while (j != sj);
}
int
{
int r, c; /* visible # of rows and cols */
if (!m) {
return (E_BAD_ARGUMENT);
}
if (Indriver(m)) {
return (E_BAD_STATE);
}
if (Posted(m)) {
return (E_POSTED);
}
/* Make sure there is at least one item present */
/* Make sure the menu fits into the window horizontally */
return (E_NO_ROOM);
}
/* Create the menu window and derived windows */
return (E_SYSTEM_ERROR);
}
/*
* Take the minimum of the height of the menu (Height), the
* physical height of the window (r), and the number of rows
* in the menu (Rows).
*/
return (E_SYSTEM_ERROR);
}
/* If needed, link all items in the menu */
if (LinkNeeded(m)) {
_link_items(m);
}
SetPost(m);
/* If only one value can be set then unset all values */
/* to start. */
if (OneValue(m)) {
}
}
/* Go do the drawing of the menu */
_draw(m);
Minit(m);
Iinit(m);
_show(m); /* Display the menu */
return (E_OK);
}
return (E_NOT_CONNECTED);
}