home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / open-look / 03-xview < prev    next >
Encoding:
Text File  |  1997-07-25  |  7.8 KB  |  203 lines

  1. Newsgroups: comp.windows.open-look,alt.toolkits.xview,comp.windows.news,alt.toolkits.intrinsics,comp.answers,alt.answers,news.answers
  2. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!newsxfer3.itd.umich.edu!europa.clark.net!199.60.229.3!newsfeed.direct.ca!news.uunet.ca!gts!lethe!geac!sq!lee
  3. From: lee@sq.com (Liam Quin)
  4. Subject: OPEN LOOK GUI FAQ 03/04: the XView Toolkit
  5. Message-ID: <liamfaq-ol3-62@sq.com>
  6. Followup-To: poster
  7. Summary: FAQ for the freely available XView X Windows toolkit
  8. Supersedes: <liamfaq-ol3-61@sq.com>
  9. Reply-To: lee@sq.com (Liam R. E. Quin)
  10. Organization: SoftQuad Inc., Toronto, Canada
  11. References: <liamfaq-ol1-63@sq.com> <liamfaq-ol2-62@sq.com>
  12. Date: Thu, 24 Jul 1997 22:06:17 GMT
  13. Approved: news-answers-request@MIT.EDU
  14. Expires: Sun, 24 Aug 1997 02:49:16 GMT
  15. Lines: 186
  16. Xref: senator-bedfellow.mit.edu comp.windows.open-look:12920 alt.toolkits.xview:4461 comp.windows.news:5961 comp.answers:27242 alt.answers:27810 news.answers:108106
  17.  
  18. Archive-name: open-look/03-xview
  19. Last-Modified: Jun 7 1996
  20.  
  21. This is a new FAQ.
  22.  
  23. Contributions will be welcomed; mail them to lee@sq.com (Liam Quin),
  24. preferably including "XView FAQ" in the Subject line.
  25.  
  26. Contents:
  27.     Sources Of Information:
  28.     The Future of XView
  29.     Scrolling Lists
  30.     How do I keep a pop-up window displayed after a button is pressed?
  31.     how do I make an XView button look pressed?
  32.     OpenWindows 3 imake doesn't work properly
  33.     The pop-up menu in my canvas has funny colours
  34.     The second ttysw in my program doesn't work
  35.     How do arrange to have a (Cancel) button to stop a calacuation?
  36.     How do I put panel items on a canvas?
  37.  
  38.  
  39. Subject: Sources Of Information:
  40.     netnews newsgroups:
  41.     alt.toolkits.xview    - best for specific XView questions
  42.     comp.windows.open-look
  43.     comp.windows.x        - highest volume
  44.     Watch for Frequently Asked Questions lists (such as this) in these
  45.     groups.  The article you are reading is part of the alt.toolkits.xview
  46.     and comp.windows.open-look FAQ.
  47.  
  48.     Books:
  49.     See the comp.windows.open-look FAQ, which lists several books on X
  50.     and XView.  The O'Reiily books in particular are recommended.
  51.     
  52.     Source: code:
  53.     the FTP site ftp.x.org in directory /R5contrib (?), has the
  54.     full XView source (the latest release is 3.2), together with lots
  55.     of X programs.  Programs whose name ends in "tool" or starts with
  56.     "xv" are often based on XView.
  57.  
  58. Subject: The Future of XView
  59.  
  60.     XView is no longer a Strategic Direction for Sun.  It will be supported
  61.     for the next few years, but new features will not be added.
  62.     On the other hand, the source is publicly available.
  63.     XView is included with SunOS and Solaris, and also with some versions
  64.     of Linux.
  65.  
  66.     Sun will be moving to a motif-like user interface in 1995, with the
  67.     shipping of COSE/CDE.  At that time, XView will be less interesting to
  68.     many people.
  69.  
  70.     Since it's probably the easiest X toolkit to use that's easily and
  71.     widely available, XView will probably be widely used for a while.
  72.  
  73.  
  74.  
  75. Subject: Scrolling Lists
  76.  
  77. @ How do I set the font of individual Scrolling List items?
  78.     PANEL_LIST_FONT takes an int row_number and an Xv_opaque font_handle.
  79.     PANEL_LIST_FONTS take a NULL terminated list of Xv_opaque font_handles.
  80.     There is no easy way to make an entire list fixed width font.
  81.     You have to make sure that you always specify PANEL_LIST_FONT when you
  82.     insert a new row into that list, or write a convenience function
  83.     insert_row(list, row, string) that hides the nasty bits.
  84.     The most efficient way to do this involves creating an Xv_attr array
  85.     to do lots of insertions at once, complete with PANEL_LIST_FONTs.
  86.  
  87.     If you give both PANEL_LIST_STRING and PANEL_LIST_FONT in the same
  88.     xv_set() call, PANEL_LIST_STRING must be given first, or the default
  89.     font will be used.
  90.  
  91. @ How do I set the selected item of an exclusive list with required choice?
  92.     If you have a PANEL_LIST with a required choice, and the list is
  93.     exclusive, you must de-select the old item and select the new one in
  94.     a single xv_set() call, for example:
  95.  
  96.     xv_create(owner, PANEL_LIST,
  97.         ....
  98.         PANEL_CHOOSE_ONE, TRUE,    /* only one entry can be selected */
  99.         PANEL_CHOOSE_NONE, FALSE,  /* one entry must be selected      */
  100.         NULL
  101.     );
  102.  
  103.     xv_set(List,
  104.         PANEL_CHOOSE_NONE, TRUE,
  105.         PANEL_LIST_SELECT, xv_get(List, PANEL_LIST_FIRST_SELECTED), FALSE,
  106.         PANEL_LIST_SELECT, row, TRUE,
  107.         PANEL_CHOOSE_NONE, FALSE,
  108.         NULL
  109.     );
  110.  
  111.     Note: you may find it useful to start with PANEL_CHOOSE_NONE true so that
  112.     the list comes up with no selection; and then on the first selection set
  113.     PANEL_CHOOSE_NONE to FALSE so that a selection is required.
  114.  
  115.  
  116.  
  117. Subject: How do I keep a pop-up window displayed after a button is pressed?
  118.     In the button callback, do
  119.         xv_set(button, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
  120.     This will keep the window visible.
  121.     You might also need to investigate the MENU_NOTIFY_STATUS attribute.
  122.  
  123. Subject: how do I make an XView button look pressed?
  124.     call panel_begin_preview() and panel_cancel_preview(); these are
  125.     documented in -- er -- the XView 3 source...
  126.  
  127. Subject: OpenWindows 3 imake doesn't work properly
  128.     Paul DuBois <dubois@primate.wisc.edu> has written some useful notes
  129.     on this; see:
  130.     http://www.primate.wisc.edu/software/imake-stuff
  131.     ftp://ftp.primate.wisc.edu/software/imake-stuff
  132.     There are both text and PostScript versions of his notes.
  133.  
  134.     Here also is Greg Earle's patch, to be applied in $OPENWINHOME; note
  135.     that you should edit lib/config/sun.cf afterwards to get OSName and
  136.     OSMinorVersion right (MinorVersion is 1 in SunOS 4.1.4, for example).
  137.     I have edited the patch a little, so any bugs are mine [lee@sq.com] :-)
  138.  
  139. *** bin/xmkmf.orig    Wed Sep 18 07:02:02 1991
  140. --- bin/xmkmf    Tue Aug  6 00:39:20 1991
  141. ***************
  142. *** 30,34 ****
  143.   
  144.   elif [ -n "$OPENWINHOME" ]; then
  145. !     args="-DUseInstalled $OPENWINHOME/lib/config"
  146.   
  147.   else
  148. --- 30,34 ----
  149.   
  150.   elif [ -n "$OPENWINHOME" ]; then
  151. !     args="-I$OPENWINHOME/lib/config -DUseInstalled -DXCOMM='/**/#'"
  152.   
  153.   else
  154. *** lib/config/site.def.orig    Wed Sep 18 01:26:19 1991
  155. --- lib/config/site.def    Tue Aug  6 00:44:37 1991
  156. ***************
  157. *** 0 ****
  158. --- 1,7 ----
  159. + #define BinDir $(OPENWINHOME)/bin
  160. + #define LibDir $(OPENWINHOME)/lib
  161. + #define IncRoot $(OPENWINHOME)/share/include
  162. + #define InstallNonExecFile(file,dest)                    @@\
  163. + install:: file                                @@\
  164. +     $(INSTALL) -c $(INSTDATFLAGS) file dest
  165. + #define NullParameter
  166.  
  167.  
  168. Subject: The pop-up menu in my canvas has funny colours
  169.     You need to use CMS_CONTROL_CMS when you create the CMS for your canvas.
  170.     This allocates the OPEN LOOK UI 3D colors at the start of the colormap.
  171.     The foreground color lives right at the end.
  172.  
  173. Subject: The second ttysw in my program doesn't work
  174.     XView only supports one ttysw per program!
  175.  
  176. Subject: How do arrange to have a (Cancel) button to stop a calacuation?
  177.     When you are doing cpu-intensive calculations, your program probably
  178.     isn't calling the XView notifier, so that button presses aren't noticed
  179.     until the computation is over.
  180.     There are several possible solutions:
  181.     * use the implicit or explicit notify displatch mechanism, described
  182.       in the Notifier chapter of the XView Programming Manual (O'Reilly);
  183.     * use multiple processes, and send signals;
  184.     * split up the work into small chunks and use notify_stop to return to
  185.       the main loop for each chunk.
  186.  
  187. Subject: How do I put panel items on a canvas?
  188.     You don't.
  189.     You can, however, draw on a panel, as if it was a canvas.
  190.     Another alternative is to use olgx to render the controls, but this is
  191.     a little tricky.
  192.  
  193.  
  194. END of XView FAQ
  195.  
  196. # $Id: ol3.faq,v 1.4 96/06/07 18:00:33 lee Exp $
  197.  
  198. -- 
  199. Liam Quin                   | lq-text freely available Unix text retrieval
  200. liamquin at interlog.com    | FAQs: Metafont fonts, OPEN LOOK UI, OpenWindows
  201.                             | xfonttool (Unix xfontsel in XView)
  202. +1 416 594 9646 (home)      | the barefoot programmer
  203.