home *** CD-ROM | disk | FTP | other *** search
- Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!panix!news.mathworks.com!newsfeed.internetmci.com!news.jaguNET.com!not-for-mail
- From: mahesh@jaguNET.com (B.G. Mahesh)
- Newsgroups: comp.windows.ui-builders.teleuse,comp.windows.x,comp.windows.x.motif,comp.answers,news.answers
- Subject: FAQ: TeleUSE GUI Builder
- Followup-To: comp.windows.ui-builders.teleuse
- Date: 18 Mar 1997 11:16:28 -0500
- Organization: Sheetal, Inc.
- Lines: 988
- Approved: news-answers-request@MIT.EDU
- Distribution: inet
- Message-ID: <5gmf4s$occ@shado.jaguNET.com>
- Reply-To: mahesh@mahesh.com
- NNTP-Posting-Host: shado.jagunet.com
- Summary: Frequently Asked questions for TeleUSE GUI Builder
- Keywords: FAQ TeleUSE Motif GUI Builder
- Xref: senator-bedfellow.mit.edu comp.windows.ui-builders.teleuse:401 comp.windows.x:114851 comp.windows.x.motif:56720 comp.answers:24941 news.answers:97513
-
- Archive-name: ui-builders/TeleUSE
- Last-Modified: March 18, 1997
-
- CVS Version: $Id: TeleUSE.FAQ,v 1.2 1997/03/18 16:15:45 mahesh Exp $
-
- Welcome to TeleUSE GUI Builder FAQ :-)
-
- Currently the FAQ is being maintained by B.G. Mahesh [mahesh@mahesh.com]
-
- Frequency: This will be posted on the first of every month on
- comp.windows.x, comp.windows.x.motif,
- comp.windows.ui-builders.teleuse and the TeleUSE mailing list.
-
- Individuals are encouraged to submit corrections, questions and answers
- to mahesh@mahesh.com directly. In many answers below, submitters are
- noted in parentheses at the beginning of comments. (Comments may be
- slightly edited.)
-
- Myself and all contributors claim no responsibility for the accuracy
- of the information in the FAQ. The FAQ is not meant to be specific technical
- advice. It is only a starting point. I am not responsible for the
- material you read on all the links on this page.
-
- Many FAQs, including this one, are available via FTP on the archive site
- rtfm.mit.edu in the directory pub/usenet/news.answers/ui-builders.
- To get this FAQ by E-mail, you should send a message to
- mail-server@rtfm.mit.edu with
- send usenet/news.answers/ui-builders/TeleUSE
- in the body of the message. Make sure you don't have a signature
- in body of the message.
-
- The ASCII version of the FAQ can be downloaded from
- rtfm.mit.edu:pub/usenet/news.answers/ui-builders/TeleUSE
-
- The HTML version of the FAQ can be accessed from
- http://www.mahesh.com/TeleUSE/faq.html
-
- This article includes answers to the following questions. Questions
- marked with a + indicate questions new to this issue; those with
- significant changes of content since the last issue are
- marked by *:
-
- Table of Contents
- -----------------
-
- Q: What is TeleUSE ?
- Q: Where can I get the product information from?
- *Q: Is there a TeleUSE mailing list? If so, how do I subscribe to
- this list?
- Q: Is there a TeleUSE Usenet newsgroup?
- Q: What other FAQs should I refer to ?
- Q: On what platforms is TeleUSE available?
- Q: To what other platforms is Thomson planning to port TeleUSE?
- Q: Does TeleUSE generate C and/or C++ ?
- Q Does TeleUSE generate Ada?
- Q: Do I need the TeleUSE library to execute an application?
- Q: Is there a D-mode for emacs/lemacs/xemacs ?
- Q: What versions of Motif do I need to use with TeleUSE?
- Q: When I call "create widget" in D using the optional parameters for
- another display and screen, the widgets appear on my default
- display/screen. How can I get "create widget" to create widgets on
- another display?
- Q: In an attribute window, what is the meaning of a gray setting
- marker ?
- Q: Does VIP allow you to add comments to a particular template ?
- If so, how?
- Q: What is the purpose of a user-defined attribute ?
- Q: How do you use the Drag-On box? What is the purpose of the Drag-On
- box in the value windows (colors, pixmaps, fonts) ?
- Q: What is a D event field? How can it be accessed in D ?
- Q: What is the difference between a Devent and a rule?
- Q: Why is it that the Devents attached to my "createCallback" attributes
- aren't always sent?
- Q: Where can you look up the widget class specific pre-defined event
- fields ?
- Q: What is the scope of a D event field for a given D event?
- Q: If there is no callback available for a particular event of interest,
- how can we attach a D event to it?
- Q: What are the valid UDA types that I can define?
- Q: Is there a way in d-code to check for the existence of
- a user-defined attribute before accessing it ?
- Q: How to access an UDA in C?
- Q: How do I send a D event from C ?
- Q: Can any C routine be called from D ? What are the limitations?
- Q: What is the purpose of the 'opaque' type?
- Q: Are type conversions in D the same as type casting in C ?
- Q: Is it possible to declare a D event that is global across more than one
- D modules ?
- Q: Is it possible to declare a D variable that is global across more than
- one D module?
- Q: What 3 things must be true in order for a widget to be visible ?
- Q: What does AIM stand for?
- Q: How can the UI builder generate AIM file?
- Q: What does uxb guess do?
- Q: If I have a string in the uxb.conf file that matches my platform
- name such as 'sun', uxb does not accept it. How can I get around
- this?
- Q: What is the difference between 'c' and 'pure-c' mode ?
- Q: What is the difference between LANGUAGE C and LANGUAGE KRC ?
- Q: How can I allow for the ehdb file to be in another directory
- besides the current working directory?
- Q: If I have a string in D that represents the name of a D event,
- how can I send the D event?
- Q: Can I use the string_list operators directly on a C global
- variable of type 'char **'?
- Q: How can I set resources on the eht help windows?
- Q: When I try to turn off the file list in the XmFileSelectionBox
- by setting 'showList' to false, I get an empty square window in the
- upper left corner of the FileSelectionBox. How can I remove it?
- Q: When I set the background color on a ScrolledWindow, I still
- can see the default color in some areas of the ScrolledWindow.
- Especially when the contents of the ScrolledWindow do not fill the
- ScrolledWindow. How can I set the whole ScrolledWindow's background?
- Q How can I specify the geometry of an application from the command-line?
- When I use the -geometry option with a TeleUSE generated application
- (e.g., <app> -geometry 600x800+50+50), the option is ignored.
- Q: Which 3rd party widgets have been integrated with TeleUSE?
- Q: Can I use the xm_string_list operations directly on the
- resources of the XmList ?
-
- Questions & Answers
- -------------------
-
-
- Q: What is TeleUSE ?
- A: [From B.G. Mahesh, mahesh@mahesh.com]
- TeleUSE is a true UIMS (User Interface Management System).
- A UIMS is designed to manage the graphical user interface
- efficiently during the life cycle of an application. TeleUSE
- is one of the leading Motif GUI builders in the industry today.
-
- Q: Where can I get the product information from?
- A: [From Marianne Worley, mworley@thomsoft.com]
-
- Marianne Worley
- Aonix (formally Thomson Software Products)
- 10251 Vista Sorrento Parkway, Suite 300
- San Diego, CA 92121
- Tel: 619-457-2700 x244
- Fax: 619-452-2117
- E-mail: guiinfo@thomsoft.com
- Web: http://www.aonix.com
-
- *Q: Is there a TeleUSE mailing list? If so, how do I subscribe to
- this list?
- A: [From B.G. Mahesh, mahesh@mahesh.com]
- Yes, there is a TeleUSE mailing list. Send an email to
- TeleUSErs-request@sd.aonix.com with the Subject set to
- "subscribe your_email_address". Contributions to the mailing
- list should be sent to newtu@sd.aonix.com
-
- Q: Is there a TeleUSE Usenet newsgroup?
- A: [From B.G. Mahesh, mahesh@mahesh.com]
- Yes. The name of the group is comp.windows.ui-builders.teleuse
-
-
- Q: What other FAQs should I refer to ?
- A: [From B.G. Mahesh, mahesh@mahesh.com]
-
- Subject: X windows
- FTP : rtfm.mit.edu:pub/usenet/news.answers/x-faq
- URL : http://www.cis.ohio-state.edu/hypertext/faq/usenet/x-faq/top.html
-
- Subject: Motif
- FTP : ftp://ftp.cen.com/pub/Motif-FAQ
- URL : http://www.cis.ohio-state.edu/hypertext/faq/usenet/motif-faq/top.html
- MW3: Motif on the World Wide Web http://www.cen.com/mw3/
-
-
- Q: On what platforms is TeleUSE available?
- A: [From Rhoda, rhoda@thomsoft.com]
-
- ----------------------------------------------------------------
- Platform OS version TeleUSE version
- ----------------------------------------------------------------
-
- DecAlpha AXP 3000/500 OSF1 v3.2 3.0.2
- DecAlpha AXP 3000/500 OpenVMS 6.1 3.0.2
- DecAlpha VAX station 3100 OpenVMS 6.1 3.0.2
- HP HP/UX 9.0.1/10.0 3.0.2
- HP Softbench HP/UX 9.03 3.0.2
- IBM RS/6000 AIX 3.2.5 3.0.2
- IBM RS/6000 AIX 4.1.4 3.0.2
- SGI Irix 5.3 3.0.2
- Sun SunOS 4.1.3 3.0.2
- Sun Solaris 2.3 3.0.2
- Sun Solaris 2.4/2.5 3.0.2
- DG AviiON GX/UX 5.4 3.0.2
- Intel x86 SVr3 SCO ODT 5.0 3.0.2
- Intel x86 SVr4 NCR 2.02 3.0.2
- Intel x86 NT 3.51/Win 95 TU/Win 3.0
-
-
- Q: To what other platforms is Thomson planning to port TeleUSE?
- A: [From Paul, paul@thomsoft.com]
-
- HP HP/UX 10.10/10.20 3.0.2
-
- Q: Does TeleUSE generate C and/or C++ ?
- A: [From Rhoda, rhoda@thomsoft.com]
- Yes, TeleUSE genertes code in C and C++.
- You can tell the TeleUSE code generator to generate code in either
- KRC, ansi style C, or C++. If you are interested in C++ code,
- you can tell the code generator to create C++ classes for
- any specified widget hierarchies (templates) that you have
- developed. You can also specify that widget descendants in the
- hierarchy should be available in the private/protected/public
- section of the C++ class generated. In addition, you can specify
- what resources for any widget in the hierarchy will be available
- via get/set member functions in the C++ generated class.
-
- Q Does TeleUSE generate Ada?
- A: [From Rhoda, rhoda@thomsoft.com]
- Ada code can also be generated using the TeleUSE/Ada
- product. This product will generate Ada code for the
- presentation layer (pcd files), the dialog layer
- (D modules) and all other intermediate source files
- (e.g. main program). The TeleUSE/Ada product as well
- as the TeleUSE product allows you to call ada subprograms
- from D.
-
- TeleUSE/Ada is available for the following platforms/compilers:
- Solaris 2.3 (AdaWorld/Verdix/RISCAda)
- SunOS 4.1.3 (AdaWorld)
- HPUX 9.03 (AdaWorld)
- SCO ODT 3.0 (AdaWorld/Verdix)
-
-
- Q: Do I need the TeleUSE library to execute an application?
- A: [From Rhoda, rhoda@thomsoft.com]
- If system A and System B the same platform/same OS,
- then if you link the application statically, you can move
- the executable to the other machine that does NOT have
- TeleUSE libraries and execute it there.
-
- By default, the TeleUSE libraries will be required to re-build
- the application. So if you need to move to another platform,
- you need to have the TeleUSE libraries available on that target.
- You can purchase them from Thomson Software Products if the target
- is a platform that we already support or you can build them yourself
- since the source code to the runtime libraries is included free with
- TeleUSE.
-
- Alternatively, you have tell the TeleUSE code generator to generate
- code that is NOT dependent on any runtime libraries, but in order
- to use this 'pure-c' mode you will not be able to take advantage
- of some of the TeleUSE features, such as D, C++, UserDefinedAttributes,
- in your application.
-
- Q: Is there a D-mode for emacs/lemacs/xemacs ?
- A: [From B.G. Mahesh, mahesh@mahesh.com]
- You should be able to find one in the $TeleUSE/TeleUSE/lib/emacs
- [where $TeleUSE is the directory in which you have installed TeleUSE]
-
- [From TJ Phan, phan@aur.alcatel.com]
- I've set up emacs/xemacs syntax highlighting for d-mode. This might be
- of use to other people. You can download this file from
- http://www.mahesh.com/TeleUSE/hl319.el
-
- Q: What versions of Motif do I need to use with TeleUSE?
- A: [From B.G. Mahesh, mahesh@mahesh.com]
- TeleUSE 3.0.x requires Motif 1.2
- TeleUSE 2.1.x requires Motif 1.1.
-
- The appropriate version of Motif and X is provided with TeleUSE
- on most platforms as a convenience to the customer.
-
-
- Q: When I call "create widget" in D using the optional parameters for
- another display and screen, the widgets appear on my default
- display/screen. How can I get "create widget" to create widgets on
- another display?
- A: [From John Goodsen, jgoodsen@radsoft.com]
- There is missing information in the 3.01 documentation set (page 4-19
- of the "Developing Dialog Components" manual)
-
- Before attempting to create any widgets on the display, you must open the
- display using "ux_define_display(...)".
-
- For example, we would first in C define the display "spot:0" with the
- logical name "spot" for the application "test":
-
- ux_define_display("test", "Test", "spot", "spot:0",
- NULL, 0, &argc, argv, &status);
-
- Then we could in D create a window on this display:
-
- remote := create widget("spotview", nil, nil, "spot", 0);
-
- This statement creates a widget named "spotview" on the default
- logical screen (0) of the remote display "spot".
-
-
- Q: In an attribute window, what is the meaning of a gray setting
- marker ?
- A: [From Thomson Software Products]
- A gray setting marker indicates that the value shown is inherited.
-
- Q: Does VIP allow you to add comments to a particular template ?
- If so, how?
- A: [From Thomson Software Products]
- If the widget is selected in the work area, you can enter text
- as comments in the right hand side of the status area (above
- the work area). These comments are saved in the pcd file as a
- 'comments' attribute.
-
- Q: What is the purpose of a user-defined attribute ?
- A: [From Thomson Software Products]
- A User-Defined Attribute allows a widget to carry data with it.
- They are useful to use instead of having to maintain so many local
- variables in a D module.
-
- Q: How do you use the Drag-On box? What is the purpose of the Drag-On
- box in the value windows (colors, pixmaps, fonts) ?
- A; [From Thomson Software Products]
- You can drag icon templates OR nodes from a tree OR widgets in the
- work area into a Drag-On box. In the Value Window, the drag-On box
- can be used to add to the list of values on the left hand side of
- the Value Window. For example, if a template is using colors that are
- defined into VIP, you can drag the template into the Drag-On box for
- the Color Value Window and the new colors will be added to the list
- of colors on the left side of the Value Window.
-
- Q: What is a D event field? How can it be accessed in D ?
- A: [From Thomson Software Products]
- Data carried with a D event. It is accessed in D using the form:
-
- <D event name>.<D event field>
-
- Q: What is the difference between a Devent and a rule?
- A: [From Larry Young, lyoung@dalmatian.com]
- A Devent is a "signal" (not in the UNIX sense!) that something has
- occurred, which contains certain contextual data. It can also be
- thought of as a notification object (instance) that has certain data
- associated with it, and that when it is "sent" it will notify all
- "rules" that have registered with it.
-
- A Rule is simply a body of code that will be run when its condition
- (i.e. the part before the keyword "does") is true. Normally, the
- condition contains the name of a Devent, so that when that Devent is
- sent, it will notify the rule and the rule will execute it's body of
- code. Note that if multiple rules are registered to the same Devent,
- their order of execution is undefined.
-
- Q: Why is it that the Devents attached to my "createCallback" attributes
- aren't always sent?
- A: [From Larry Young, lyoung@dalmatian.com]
- The problem isn't that the Devent isn't sent, it's that your rule
- hasn't been registered for that Devent yet. In TeleUSE, each Dmodule
- is initialized separately, and it is during this "init" process that
- each rule is registered with its specific Devent, local data is
- created, and the dmodule's INITIALLY rule is run. Thus, if the first
- Dmodule initialized is the one that creates the widgets, then the
- other Dmodules won't have had a chance to register their rules yet,
- therefore the createCallbacks appear to get lost.
-
- The simple solution is to not create widgets in your INITIALLY rule
- (creating and initializing local variables is ok!). Instead, do
- the following in one of your Dmodules (I usually create a separate
- Dmodule called "Main" for this and other generic Devent handlers):
-
- devents:
- MainInit :local [];
-
- locals:
- top_w : widget;
-
- rules:
- INITIALLY does
- send (MainInit); -- allow all INITIALLY's to run first !!
- end does;
-
- MainInit does
- top_w := create widget ("MyApplShell", nil, nil);
- top_w.show;
-
- --
- -- ... whatever else needs to be done ...
- --
-
- end does;
-
- end dmodule;
-
- Q: Where can you look up the widget class specific pre-defined event
- fields ?
- A: [From Thomson Software Products]
- Each of the members of the callback structure is available as a D
- event field. These callback structures can be found in the Motif
- Programmer's Reference for any given widget class, under 'Callback
- Information' or you can use 'man' on the widget class or
- 'tuqref <widget class>''
-
- Q: What is the scope of a D event field for a given D event?
- A: [From Thomson Software Products]
- The scope of a D event field is limited to the associated rule.
- It is possible to assign to another D event's D event field before
- sending the D event but it is erroneous to read another D event's
- event field.
-
-
- Q: If there is no callback available for a particular event of interest,
- how can we attach a D event to it?
- A: [From Thomson Software Products]
- A translation can be used. Also an event handler can be used which
- ties a C function to an X event. The event handler (C function)
- could 'send' a D event.
-
-
- Q: What are the valid UDA types that I can define?
- A: [From Larry Young, lyoung@dalmatian.com]
- The list provided in the Vip "Define User Attributes" window is
- only a subset of the possible choices ... not exactly intuitive!
- Basically, you can use any valid X resource type that has been
- registered with the XtConvert mechanism (at the time 'vip' was
- built!). So you can use types like:
- Alignment (XmRAlignment)
- SiblingWidget (TuRSiblingWidget)
- WidgetChild (TuRWidgetChild)
- Cursor (XtRCursor)
- XRectangleList (TuRXRectangleList)
- IntTable (TuRIntTable)
- StringTable (XtRStringTable)
- Pointer (XtRPointer)
- ... etc ...
-
- When you define UDAs in D code (e.g. "w.define("Name", "XType");"),
- you may use any valid D datatype, including any "User Datatypes"
- defined in your AIM files, as well as all the X resource types.
-
- Note that X types don't currently work from D in TU3.0.2beta :(
- Also, don't use the "Callback" type listed in the UDA Type popup
- menu in Vip, it doesn't have a converter registered for it!
-
-
- Q: Is there a way in d-code to check for the existence of
- a user-defined attribute before accessing it ?
- A: [From Larry Young, lyoung@dalmatian.com]
-
- If you are using TeleUSE 3.0.2 (the final release, not the beta),
- you can use the predefined operation "is_defined()" on the widget
- datatype. Actually, it returns the type of the attribute, but if
- it hasn't been defined it returns "nil". And this works for normal
- widget attributes as well as UDAs.
-
- So basically you can test for existence like this:
-
- if (my_w.is_defined("MyUDA") != nil) then
- -- the UDA exists
- end if;
-
- If you are using an older version of TeleUSE, you'll have to call
- "tk_user_attr_type(widget, uda_name)" which basically does the same
- thing as "is_defined" does but only works for UDAs. In fact,
- "is_defined" uses this "tk" function internally. Also, if you want
- to use the "tk" function from D, you'll have to put its function
- definition into an AIM file. You can find the function definition
- in $TeleUSE/include/teleuse/tk_widops.h.
-
- Q: How to access and set UDAs in C?
- A: [From Paul Thornton, paul@thomsoft.com]
-
- In $TeleUSE/include/teleuse/tk_widops.h you will find 2
- undocumented routines. These routines allow you to set/get
- UDAs from c code:
-
- extern void tk_get_widget_attr();
- /* Widget widget; */
- /* tu_string attr; */
- /* tu_string * prtype; */
- /* tu_pointer * pvalue; */
- /* tu_status_t * status; */
-
- extern void tk_set_widget_attr();
- /* Widget widget; */
- /* tu_string attr; */
- /* tu_string rtype; */
- /* tu_pointer value; */
- /* tu_status_t * status; */
-
- Example:
-
- tu_string uda_type;
- tu_pointer uda_value;
- tu_status_t status;
-
- tk_get_widget_attr(wid, "My_UDA", &uda_type, &uda_value, &status);
-
- -- If My_UDA is a string,
-
- char *result_str;
- result_str = (char *)uda_value;
-
- To Set UDAs:
-
- tk_set_widget_attr (wid, "Other_UDA", XtRString, uda_value, &status);
- ^^^^^^^^^
- Found in $TeleUSE/X11R5/include/StringDefs.h
-
- Q: How do I send a D event from C ?
- [From Tony Giaccone, tgia@radix.net]
-
- Caution: The following example does NO ERROR CHECKING.
-
- This is not a wise practice and will with out doubt
- get you into trouble. However, it is meant as an
- example and as an example it has no real context.
- With out a context to work in Error processing is
- pretty difficult to manage. You on the other hand
- have a context. So do the error checking.
-
- There are two steps to sending a devent from C.
-
- 1. Creating the devent instance.
-
- 2. Dispatching the event.
-
- Here's a general purpose c function which handles dispatching
- any devent.
-
- void send_d_event(
- char *devent_name,
- /* char *dfield_name, 0 or more repititions of these */
- /* char *dtype_name, 3 fields */
- /* XtPointer data_addr, */
- /* NULL) NULL must be present, terminates list */
- {
- tu_status_t status;
- ux_devent_instance devent_inst;
- va_list argsPtr;
- char *dfield_name;
- char *dtype_name;
- XtPointer data_addr;
-
-
- devent = ux_get_devent(devent_name, NULL,0, &status);
-
- if (status.all != tu_status_ok) {
-
- /* Handle the error condition */
-
- }
-
-
- /*
- ** first parse the arguments which might have been passed into
- ** our devent. This routine handles the general case if you wanted
- ** to handle only one D Event, you could simplify this code.
- **
- */
-
- va_start(arg_ptr, devent_name);
-
- while ((dfield_name = va_arg(arg_ptr, char *)) != NULL) {
-
- dtype_name = va_arg(arg_ptr, char *);
-
- data_addr = va_arg(arg_ptr, XtPointer);
-
- ux_assign_devent_field(
- devent,
- dfield_name,dtype_name,(tu_pointer)data_addr,
- &status);
-
- if (status.all != tu_status_ok) {
-
- /* Handle the error condition */
-
- } /* if (status.all != tu_status_ok) */
-
- } /* while */
-
-
- va_end(arg_ptr);
-
-
- /* CALL ONLY ONE OF THE FOLLOWING ROUTINES */
-
- /*
- ** This routine actually calls the devent. With the
- ** appropriate fields set. The event is placed into the
- ** devent queue and will be handled when it reaches the
- ** top of the queue.
- */
-
- tu_queue_event(devent,&status);
-
- /*
- ** If you called tu_queue_event don't forget to check the
- ** status of the call.
- */
-
-
- /*
- ** Or call this routine.....
- */
-
- /*
- ** this routine calls the devent immediately. There is no delay
- ** it's like makeing a send(devent,0) call in D.
- */
-
- tu_dispatch_event(devent);
-
- } /* send_d_event */
-
- So, given a D event called MyDEvent which has the
- following definition
-
- MyDEvent [ AnInt : integer;
- AString : string;
- AStruct : Out_C_Struct;
- ];
-
- where Our_C_Struct is a c structure defined in an aim file.
-
-
- In the calling code you would make the following call:
-
- send_d_event("MyDEvent",
- "AnInt", XtRInt, c_int_variable,
- "AString", XtRString, c_char_ptr,
- "AStruct", XtRPointer, a_c_structure,
- NULL);
-
-
- Q: Can any C routine be called from D ? What are the limitations?
- A: [From Thomson Software Products]
- If an only if the parameters and the return value can be accurately
- represented in D.
-
-
- Q: What is the purpose of the 'opaque' type?
- A: [From Thomson Software Products]
- The opaque thpe is PRIMARILY intended for holding pointers returned by
- C function calls. But it can hold anything that is 32 bits. If it holds
- an address, there is no way, in D, to reference the object that is
- pointing to.
-
- Q: Are type conversions in D the same as type casting in C ?
- A: [From Thomson Software Products]
- Type conversion in D actually changes the underlying bit representation
- of the object where casting does not.
-
- Q: Is it possible to declare a D event that is global across more than one
- D modules ?
- A: [From Thomson Software Products]
- Yes. Specify it in a D events file (.de file). The D devent can also
- be declared in both D modules but both declarations must be identical
- and they must not be declared as 'local'. The latter method is not
- recommended.
-
- Q: Is it possible to declare a D variable that is global across more than
- one D module?
- A: [From David Quin-Conroy]
- A local variable in a D module instance can be declared "exported" which
- makes it accessible from other D module instances. This is described in
- "Developing Dialog Components" page 4-58. The same is true for D events.
- By using the "exported" feature, there is probably no need to use .de
- files. The ability to 'export' local variables was introduced with
- TeleUSE 3.0. Although D variables are still not directly share-able, you
- CAN access another D modules local variables IF
- 1) they are exported and IF
- 2) you have a handle to the D module instance.
-
-
- Q: What 3 things must be true in order for a widget to be visible ?
- A: [From Thomson Software Products]
- It must be realized, managed, and mapped. If a widget has no parent,
- though, managing it is meaningless. A widget needs to be explicitly
- realized ONLY if none of its ancestors have been realized or it has
- no ancestors. Non-shell widget are managed automatically when they
- are created so no explicit managing is necessary. TopLevelShell and
- ApplicationShells should be opened/closed, after they have been
- realized, using:
-
- top_shell.do_popup(); <-- opens shell
- top_shell.do_popdown; <-- closes shell
-
- Q: What does AIM stand for?
- A: [From Thomson Software Products]
- Application Interface Mapping. Used for defining the C function that
- are to be called from D.
-
- Q: How can the UI builder generate AIM file?
- A: [From Thomson Software Products]
- Using the AIMEXTR entry in the configuration file. You must have access
- to the C source code in order to uxb to be able to generate the aim file.
-
- Q: What does uxb guess do?
- A: [From Thomson Software Products]
- Creates a file called uxb.conf based on the files it finds in the
- local directory.
-
- Q: If I have a string in the uxb.conf file that matches my platform
- name such as 'sun', uxb does not accept it. How can I get around
- this?
- A: [From Rhoda, rhoda@thomsoft.com]
- You can put the following in uxb.conf to undefine the word 'sun'
- in case user need that word in the config file. Example:
- if a directory has xxx/xxx/sun/xxx/xxx .
-
- #ifdef sun
- #undef sun
- #define sun sun
- #endif
-
- Q: What is the difference between 'c' and 'pure-c' mode ?
- A: [From Thomson Software Products]
- In 'pure-c' mode, no TeleUSE runtime calls are made from the
- generated c file. In this mode, no D can be used.
-
- Q: What is the difference between LANGUAGE C and LANGUAGE KRC ?
- A: [From Thomson Software Products]
- With C, the INCLUDE section is used, with KRC the INCLUDE section
- is ignored. With C, all enteries must be prototyped in a header
- file that is included and all structure definition must be in
- header file. If you are using any new features, such as structures
- or globals you need to use LANGUAGE C.
-
-
- Q: How can I allow for the ehdb file to be in another directory
- besides the current working directory?
- A: [From Rhoda, rhoda@thomsoft.com]
- In order to allow for the ehdb file to be in another directory
- you can use the DESTDIR option in the configuration file.
- Then run:
-
- > uxb -- to build
- > uxb install -- to move the file to the DESTDIR
-
- The DESTDIR configuration option changes the automatically generated
- uxb_mainc.c so that the ehdb file is looked for in the destination
- directory. The user can rely on an environment variable to find
- the file in the directory, or the path can be fixed.
-
- Q: If I have a string in D that represents the name of a D event,
- how can I send the D event?
- A: [From Rhoda, rhoda@thomsoft.com]
- Here is an example:
-
- ***********
- devents:
- foo :local[];
-
- locals:
- x: string;
- d: devent;
-
- rules:
- SomeCallback does
- x := "foo";
- d := self.(x);
- send(d);
- end does;
-
- foo does
- printf("In foo\n");
- end does;
- ************
-
- If you have a UDA of type string that represents the name of
- a D event field, you can use:
-
- *************
- x := SomeCallback.source_widget.StringUDA;
- d := self.(x);
- send(d);
- -- or simply:
- d := self.(SomeCallback.source_widget.StringUDA);
- send(d);
- *************
-
-
- Q: Can I use the string_list operators directly on a C global
- variable of type 'char **'?
- A: [From Rhoda, rhoda@thomsoft.com]
- No. Globals can only be modified by direct assignment. Dot operators
- will not work on globals directly. If you want to use the string_list
- operations, you must use a temporary local variable and then assign
- it to the global.
-
- Example:
-
- If 'global_String_list' is declared in an aim file as:
-
- TYPE
- "char **" <--> string_list;
- ENTRY
- global_string_list : "char **";
-
- In D use:
- -- build the string_list:
- local_string_list := create string_list();
- local_string_list.insert("item1",0);
- local_string_list.insert("item2",0);
- local_string_list.insert("item3",0);
- local_string_list.insert("item4",0);
-
- -- assign to the global:
- global_string_list := local_string_list;
-
-
-
- Q: How can I set resources on the eht help windows?
- A: [From Rhoda, rhoda@thomsoft.com]
- You can set resources for the Help Windows in a resource file.
- The name of the eht help window TopLevelShell widget is 'eht'.
-
- To set the iconPixmap of the help windows in a resource file use:
-
- *eht*iconPixmap: <bitmap file name>
-
- To set the fontList for the buttons in the help window use:
-
- *eht*fontlist: <font specification>
-
- To set the fontlist for a help window frame use:
-
- *eht*help_text.fontlist: <font specification>
-
- Q: When I try to turn off the file list in the XmFileSelectionBox
- by setting 'showList' to false, I get an empty square window in the
- upper left corner of the FileSelectionBox. How can I remove it?
- A: [From Rhoda, rhoda@thomsoft.com]
- The problem is occurring because XmScrolledWindow parent of the
- file list needs to be unmapped.
-
- To remove the problem, use:
-
- dmodule main
- #include <teleuse/teleuse.h>
- ...
- INIITIALLY does
- top := create widget ...
- list_wid : widget := XmFileSelectionBoxGetChild(top->FSB, XmDIALOG_LIST);
- list_wid.parent.mapped := false;
- ^^^^^^
- set the XmScrolledWindow not just the XmList.
-
- also use:
-
- uxb.conf
- -------
- DINCLUDEDIR $TeleUSE/include
-
- to define teleuse/teleuse.h in d.
-
- Q: When I set the background color on a ScrolledWindow, I still
- can see the default color in some areas of the ScrolledWindow.
- Especially when the contents of the ScrolledWindow do not fill the
- ScrolledWindow. How can I set the whole ScrolledWindow's background?
- A: [From Rhoda, rhoda@thomsoft.com]
- You can set the background of the WHOLE scrolledWindow in D using:
-
- top->ScrolledWindowClipWindow.background := top->scrolledWindow.background;
- top->VertScrollBar.background := top->scrolledWindow.background;
- top->HorScrollBar.background := top->scrolledWindow.background;
-
- The internal widget names for a scrolledWindow are:
-
- ScrolledWindowClipWindow
- VertScrollBar
- HorScrollBar
-
- Q How can I specify the geometry of an application from the command-line?
- When I use the -geometry option with a TeleUSE generated application
- (e.g., <app> -geometry 600x800+50+50), the option is ignored.
-
- A: [From Larry Young (lyoung@dalmatian.com) and Rhoda Quate (rhoda@thomsoft.com)]
-
- The "-geometry" command-line option is defined by Xt as ".geometry", not
- "*geometry". When TeleUSE builds an application, it places an "invisible"
- shell above all your shells to provide a consistent way of naming resources;
- therefore, your "-geometry" specification is being applied to this invisible
- shell instead of to the one you had intended.
-
- Instead, use the -xrm option (e.g., <app> -xrm "*geometry: 600x800+50+50").
- The downside of this approach is that it will affect ALL TopLevelShells
- that are in your application for which the size/position is not
- hard-coded! You can limit this problem if you know the name of the
- shell at the top of the widget tree (assuming you know its name). In
- that case, replace the "*" with "*widget_name."
- (e.g., <app> -xrm "*AppShell.geometry: 600x800+50+50").
-
-
- Q: Which 3rd party widgets have been integrated with TeleUSE?
- A: [From Rhoda Quate, rhoda@thomsoft.com]
-
-
- Name : XRT widgets
- Vendor : KL Group
- Description : Integrations are maintained by Thomson Software for:
- XRT/3d
- The easiest way to build informative and dynamic
- 3-D charts and graphs into Motif applications.
- XRT/field
- The easiest way to build professional data-entry
- fields into Motif applications.
- XRT/gear (integration promised soon)
- The essential collection of add-on widgets and
- utilities for Motif.
- XRT/graph
- The easiest way to build powerful 2-D charts and
- graphs into Motif applications.
- XRT/table
- The essential multi-purpose widget for displaying
- and editing lists, tables and forms.
- Email : info@klg.om
- Home Page : http://www.klg.com
- Download Integration: ftp.klg.com:/pub/integrations/TeleUSE.tar.z
-
-
-
- Name : Xbae
- Vendor : Public Domain
- Description : XbaeMatrix is a Motif widget which presents an editable
- array of string data to the user in a scrollable table
- similar to a spreadsheet.
- XbaeCaption is a simple Motif manager widget used to
- associate an XmLabel (caption) with it's single child.
- Source : ftp.x.org:contrib/widgets/motif/Xbae-4.5.tar.gz
- Download Integration: http://www.mahesh.com/TeleUSE/xbae_teleuse.tar.gz
-
-
- Name : Tuw Widgets
- Description : TuwItemBox
- Container that manages special kinds of objects called
- Tuw items. A Tuw item can consist of an icon and an
- optional name.
- TuwItemMenu
- Designed to handle the common situation requiring a
- dynamic menu, one in which the number of items varies
- as the application executes.
- TuwSource
- Displays a text file with line numbers in front of
- each line. TuwSource widget was
- developed to support source display in a debugger.
- TuwTree
- Displays a tree structure of nodes.
- TuwTable
- Allows you to build tables with different kinds of
- objects.
- Source : Included with TeleUSE in $TeleUSE/conf/examples/tuw
-
-
- Name : DT Widgets
- Description : SpinButton
- A widget that allows you to cycle through a list
- of values in the forward or reverse direction.
- ComboBox
- A widget that contains a text and an arrow which
- posts a list of options for selection upon button press.
- Source : Included with TeleUSE $TeleUSE/conf/examples/cde
-
-
- Name : EnhancementPak Widgets
- Vendor : ICS
- Description : A collection of general purpose widgets, consisting
- of controls, geometry managers, and resource editors.
- Email : info@ics.com
- Home Page : http://www.ics.com/Products/Epak/epak.html
-
-
- Q: Can I use the xm_string_list operations directly on the
- resources of the XmList ?
- A: [From B.G. Mahesh, mahesh@mahesh.com and
- Rhoda, rhoda@thomsoft.com]
-
- Is the following code valid ?
-
- top->nameScrolledList.selectedItems.rewind;
- if (top->nameScrolledList.selectedItems.more) then
- sv := top->nameScrolledList.selectedItems.next;
- end if;
-
- Syntatically it is correct but you should not do such operations
- (like rewind) directly on the scrolled list.
- Load top->nameScrolledList.selectedItems to a local
- variable before operating on it. This is because this expression
- invokes a function call and stores the result in a temporary
- variable. Operating on the temporary variable is useless.
-
-
- ------------------------------------------------------------------
- B.G. Mahesh | Home Page: http://www.mahesh.com
- Internet Consultant | FAQ Maintainer of TeleUSE GUI Builder
- Email: mahesh@mahesh.com |
-