[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
|
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
3214.0. "dialog box and stext..help needed" by TMIS01::DORON (Doing my BEST !!!) Thu Aug 16 1990 04:58
The following was also posted in the DECWINDOWS_PROGRAMMING notes (#1005),
and any help will be appreciated by me and my coleague Itamar.
================================================================================
Note 1005.0 dialog box and stext..help needed No replies
TAV02::ITAMAR_E 151 lines 15-AUG-1990 11:11
--------------------------------------------------------------------------------
Hi,
I have some problems with d.box and stext widgets. Any kind of help will
be blessed.
1.For some reason I can't get a MAP callback from a d.box although I think
I made all the required definitions for it. What's wrong?
2.The d.box can't get the input focus unless it has a child that can get
it like stext. It is possible to undestand from the documentation that
a d.box can get the input focus in any case. Is it a normal behavior?
3. I have some difficulties to set an insert position in a stext widget
using UIL. I'll be greatful if someone will donate me a little example
that does it.
Thanks,
itamar.
-------------------------------------------------------------------------------
Following some fragments of uil and C.
module DDT
version = 'v1.0'
names = case_sensitive
include file 'DwtAppl.uil';
.
.
procedure
MapActivated(string);
.
.
object
main_widget: main_window {
arguments {
width = 400;
height =300;
main_menu_bar = menu_bar menu_bar_widget;
};
controls {
attached_dialog_box dialog_widget;
menu_bar menu_bar_widget;
};
};
object
dialog_widget : attached_dialog_box {
controls {
label label_widget;
push_button push_widget;
push_button push_widget5;
unmanaged caution_box caution_box_widget;
};
callbacks {
map = procedure MapActivated(goodbye);
};
};
end module;
#include <stdio.h>
/*#include <DECwDwtApplProg.h>*/
#include <decw$include/DwtAppl.h>
static XtCallbackProc MapActivated();
.
.
.
static DRMHierarchy hierarchy;
static DRMCode class;
static char *fname[] = "tsc:[itamar.decw]d3.uid";
static DRMRegisterArg regvec[] = {
{"ButtonActivated", (caddr_t)ButtonActivated},
{"LabelCreated" , (caddr_t)LabelCreated},
{"Button5Activated", (caddr_t)Button5Activated},
{"CautionCreated", (caddr_t)CautionCreated},
{"MapActivated", (caddr_t)MapActivated}
};
main(argc, argv)
unsigned int argc;
char *argv[];
{
Widget top_level, main_window;
int status;
DwtInitializeDRM();
top_level = XtInitialize("Hi there!", /* application name */
"Example program", /* application class */
NULL, /* pointer to options */
0, /* number of options */
&argc, argv); /* command line */
if ((DwtOpenHierarchy(1, fname, NULL, &hierarchy)) != DRMSuccess)
{
fprintf(stderr, "Can't open DRM hirarchy\n");
exit(0);
}
DwtRegisterDRMNames(regvec, 5);
if((DwtFetchWidget(hierarchy, "main_widget", top_level, &main_window, &class)) != DRMSuccess)
{
fprintf(stderr,"can't fetch widget\n");
exit(0);
}
XtManageChild(main_window);
/* Realize the widget hierarchy, creating and mapping windows */
XtRealizeWidget(top_level);
XtMainLoop(); /* Never returns */
}
static XtCallbackProc MapActivated(widget, tag, reason)
Widget widget;
char *tag;
DwtAnyCallbackStruct *reason;
{
printf("%s\n",tag);
printf("Mapped\n");
printf("Mapped\n");
printf("Mapped\n");
printf("Mapped\n");
printf("Mapped\n");
printf("Mapped\n");
}
T.R | Title | User | Personal Name | Date | Lines |
---|
3214.1 | | RTL::JUNE | | Thu Aug 16 1990 11:18 | 10 |
|
Re.
>1.For some reason I can't get a MAP callback from a d.box although I think
> I made all the required definitions for it. What's wrong?
Are you using a normal dialog box or a popup dialog box? Normal dialog
boxes don't have a map callback.
Rich
|