Xaw3_1SmeBSB.c revision 749
749N/A * Copyright 1989 Massachusetts Institute of Technology 749N/A * Permission to use, copy, modify, distribute, and sell this software and its 749N/A * documentation for any purpose is hereby granted without fee, provided that 749N/A * the above copyright notice appear in all copies and that both that 749N/A * copyright notice and this permission notice appear in supporting 749N/A * documentation, and that the name of M.I.T. not be used in advertising or 749N/A * publicity pertaining to distribution of the software without specific, 749N/A * written prior permission. M.I.T. makes no representations about the 749N/A * suitability of this software for any purpose. It is provided "as is" 749N/A * without express or implied warranty. 749N/A * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL 749N/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. 749N/A * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 749N/A * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 749N/A * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 749N/A * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 749N/A * Date: September 26, 1989 749N/A * By: Chris D. Peterson 749N/A * Semi Public function definitions. 749N/A * Private Function Definitions. 749N/A /* class_name */ "SmeBSB",
749N/A /* Menu Entry Fields */ 749N/A /* BSB Menu entry Fields */ 749N/A/************************************************************ 749N/A * Semi-Public Functions. 749N/A ************************************************************/ 749N/A/* Function Name: ClassInitialize 749N/A * Description: Initializes the SmeBSBObject. 749N/A/* Function Name: Initialize 749N/A * Description: Initializes the simple menu widget 749N/A * Arguments: request - the widget requested by the argument list. 749N/A * new - the new widget with both resource and non 749N/A/* Function Name: Destroy 749N/A * Description: Called at destroy time, cleans up. 749N/A * Arguments: w - the simple menu widget. 749N/A/* Function Name: Redisplay 749N/A * Description: Redisplays the contents of the widget. 749N/A * Arguments: w - the simple menu widget. 749N/A * event - the X event that caused this redisplay. 749N/A * region - the region the needs to be repainted. 749N/A/* Function Name: SetValues 749N/A * Description: Relayout the menu when one of the resources is changed. 749N/A * Arguments: current - current state of the widget. 749N/A * request - what was requested. 749N/A * new - what the widget will become. 749N/A/* Function Name: QueryGeometry. 749N/A * Description: Returns the preferred geometry for this widget. 749N/A * Arguments: w - the menu entry object. 749N/A * itended, return_val - the intended and return geometry info. 749N/A * Returns: A Geometry Result. 749N/A * See the Intrinsics manual for details on what this function is for. 749N/A * I just return the height and width of the label plus the margins. 749N/A/* Function Name: FlipColors 749N/A * Description: Invert the colors of the current entry. 749N/A * Arguments: w - the bsb menu entry widget. 749N/A/************************************************************ 749N/A ************************************************************/ 749N/A/* Function Name: GetDefaultSize 749N/A * Description: Calculates the Default (preferred) size of 749N/A * Arguments: w - the menu entry widget. 749N/A * width, height - default sizes (RETURNED). 749N/A/* Function Name: DrawBitmaps 749N/A * Description: Draws left and right bitmaps. 749N/A * Arguments: w - the simple menu widget. 749N/A * gc - graphics context to use for drawing. 749N/A/* Function Name: GetBitmapInfo 749N/A * Description: Gets the bitmap information from either of the bitmaps. 749N/A * Arguments: w - the bsb menu entry widget. 749N/A * is_left - TRUE if we are testing left bitmap, 749N/A * FALSE if we are testing the right bitmap. 749N/A "get Left Bitmap geometry information for menu entry ",
749N/A "Left Bitmap of entry ",
749N/A "get Right Bitmap geometry information for menu entry ",
749N/A " is not one bit deep.");
749N/A/* Function Name: CreateGCs 749N/A * Description: Creates all gc's for the simple menu widget. 749N/A * Arguments: w - the simple menu widget. 749N/A/* Function Name: DestroyGCs 749N/A * Description: Removes all gc's for the simple menu widget. 749N/A * Arguments: w - the simple menu widget. 749N/A * The apollo compiler that we have optomizes out my code for 749N/A * FlipColors() since it is static. and no one executes it in this 749N/A * file. I am setting the function pointer into the class structure so 749N/A * that it can be called by my parent who will tell me to when to 749N/A * highlight and unhighlight.