changes for shack layout element

This commit is contained in:
spence 1998-05-12 18:25:24 +00:00
Родитель a7d45e7b25
Коммит cec66f76e1
6 изменённых файлов: 79 добавлений и 106 удалений

Просмотреть файл

@ -533,6 +533,10 @@ BOOL FE_FileType(char * path,
(*context->funcs->SetFormElementToggle)(context, form_element,toggle) (*context->funcs->SetFormElementToggle)(context, form_element,toggle)
#define FE_FreeEmbedElement(context, data) \ #define FE_FreeEmbedElement(context, data) \
(*context->funcs->FreeEmbedElement)(context, data) (*context->funcs->FreeEmbedElement)(context, data)
#ifdef SHACK
#define FE_FreeBuiltinElement(context, data) \
(*context->funcs->FreeBuiltinElement)(context, data)
#endif
#define FE_CreateEmbedWindow(context, data) \ #define FE_CreateEmbedWindow(context, data) \
(*context->funcs->CreateEmbedWindow)(context, data) (*context->funcs->CreateEmbedWindow)(context, data)
#define FE_SaveEmbedWindow(context, data) \ #define FE_SaveEmbedWindow(context, data) \
@ -566,6 +570,10 @@ BOOL FE_FileType(char * path,
(*context->funcs->DisplayText)(context, iLocation, text, need_bg) (*context->funcs->DisplayText)(context, iLocation, text, need_bg)
#define FE_DisplayEmbed(context, iLocation , embed_struct) \ #define FE_DisplayEmbed(context, iLocation , embed_struct) \
(*context->funcs->DisplayEmbed)(context, iLocation ,embed_struct) (*context->funcs->DisplayEmbed)(context, iLocation ,embed_struct)
#ifdef SHACK
#define FE_DisplayBuiltin(context, iLocation , builtin_struct) \
(*context->funcs->DisplayBuiltin)(context, iLocation ,builtin_struct)
#endif
#define FE_DisplayJavaApp(context, iLocation , java_struct) \ #define FE_DisplayJavaApp(context, iLocation , java_struct) \
(*context->funcs->DisplayJavaApp)(context, iLocation ,java_struct) (*context->funcs->DisplayJavaApp)(context, iLocation ,java_struct)
#define FE_DisplayEdge(context, iLocation ,edge_struct) \ #define FE_DisplayEdge(context, iLocation ,edge_struct) \
@ -710,6 +718,9 @@ void FE_GetFormElementValue(MWContext * context, LO_FormElementStruct
void FE_ResetFormElement(MWContext * context, LO_FormElementStruct * form_element); void FE_ResetFormElement(MWContext * context, LO_FormElementStruct * form_element);
void FE_SetFormElementToggle(MWContext * context, LO_FormElementStruct * form_element, Bool toggle); void FE_SetFormElementToggle(MWContext * context, LO_FormElementStruct * form_element, Bool toggle);
void FE_FreeEmbedElement(MWContext *context, LO_EmbedStruct *); void FE_FreeEmbedElement(MWContext *context, LO_EmbedStruct *);
#ifdef SHACK
void FE_FreeBuiltinElement(MWContext *context, LO_BuiltinStruct *);
#endif
void FE_FreeJavaAppElement(MWContext *context, struct LJAppletData *appletData); void FE_FreeJavaAppElement(MWContext *context, struct LJAppletData *appletData);
void FE_HideJavaAppElement(MWContext *context, void*); void FE_HideJavaAppElement(MWContext *context, void*);
void FE_FreeEdgeElement(MWContext *context, LO_EdgeStruct *); void FE_FreeEdgeElement(MWContext *context, LO_EdgeStruct *);
@ -730,6 +741,9 @@ void FE_SetBackgroundColor(MWContext *context, uint8 red, uint8 green
extern void FE_DisplaySubtext(MWContext * context, int iLocation, LO_TextStruct *text, int32 start_pos, int32 end_pos, Bool need_bg); extern void FE_DisplaySubtext(MWContext * context, int iLocation, LO_TextStruct *text, int32 start_pos, int32 end_pos, Bool need_bg);
extern void FE_DisplayText(MWContext * context, int iLocation, LO_TextStruct *text, Bool need_bg); extern void FE_DisplayText(MWContext * context, int iLocation, LO_TextStruct *text, Bool need_bg);
void FE_DisplayEmbed(MWContext * context, int iLocation ,LO_EmbedStruct *embed_struct); void FE_DisplayEmbed(MWContext * context, int iLocation ,LO_EmbedStruct *embed_struct);
#ifdef SHACK
void FE_DisplayBuiltin(MWContext * context, int iLocation ,LO_BuiltinStruct *builtin_struct);
#endif
void FE_DisplayJavaApp(MWContext * context, int iLocation ,LO_JavaAppStruct *java_struct); void FE_DisplayJavaApp(MWContext * context, int iLocation ,LO_JavaAppStruct *java_struct);
void FE_DisplayEdge(MWContext * context, int iLocation ,LO_EdgeStruct *edge_struct); void FE_DisplayEdge(MWContext * context, int iLocation ,LO_EdgeStruct *edge_struct);
void FE_DisplayTable(MWContext * context, int iLocation ,LO_TableStruct *table_struct); void FE_DisplayTable(MWContext * context, int iLocation ,LO_TableStruct *table_struct);

Просмотреть файл

@ -123,7 +123,12 @@
#define LO_HEADING 25 #define LO_HEADING 25
#define LO_SPAN 26 #define LO_SPAN 26
#define LO_DIV 27 #define LO_DIV 27
#ifdef SHACK
#define LO_BUILTIN 28
#define LO_SPACER 29
#else
#define LO_SPACER 28 #define LO_SPACER 28
#endif /* SHACK */
#define LO_FONT_NORMAL 0x0000 #define LO_FONT_NORMAL 0x0000
#define LO_FONT_BOLD 0x0001 #define LO_FONT_BOLD 0x0001
@ -979,6 +984,44 @@ struct LO_EmbedStruct_struct {
int32 percent_height; /* needed for relayout. */ int32 percent_height; /* needed for relayout. */
}; };
#ifdef SHACK
struct LO_BuiltinStruct_struct {
int16 type;
int16 x_offset;
int32 ele_id;
int32 x, y;
int32 y_offset;
int32 width, height;
int32 line_height;
LO_Element *next;
LO_Element *prev;
ED_Element *edit_element;
int32 edit_offset;
void * FE_Data;
void *session_data;
PA_Block builtin_src;
int32 attribute_cnt;
char **attribute_list;
char **value_list;
int32 alignment;
int32 border_width;
int32 border_vert_space;
int32 border_horiz_space;
uint16 ele_attrmask; /* floating, secure, selected, etc. */
int32 builtin_index; /* Unique ID within this doc */
struct LO_BuiltinStruct_struct *nextBuiltin;
#ifdef MOCHA
struct JSObject *mocha_object;
#endif
PA_Tag *tag;
CL_Layer *layer;
int32 percent_width; /* needed for relayout. */
int32 percent_height; /* needed for relayout. */
};
#endif /* SHACK */
#define LO_JAVA_SELECTOR_APPLET 0 #define LO_JAVA_SELECTOR_APPLET 0
#define LO_JAVA_SELECTOR_OBJECT_JAVA 1 #define LO_JAVA_SELECTOR_OBJECT_JAVA 1
#define LO_JAVA_SELECTOR_OBJECT_JAVAPROGRAM 2 #define LO_JAVA_SELECTOR_OBJECT_JAVAPROGRAM 2
@ -1226,6 +1269,9 @@ union LO_Element_struct {
LO_SpanStruct lo_span; LO_SpanStruct lo_span;
LO_DivStruct lo_div; LO_DivStruct lo_div;
LO_SpacerStruct lo_spacer; LO_SpacerStruct lo_spacer;
#ifdef SHACK
LO_BuiltinStruct lo_builtin;
#endif /* SHACK */
}; };
struct LO_ObjectStruct_struct { struct LO_ObjectStruct_struct {
@ -1315,6 +1361,9 @@ typedef enum LO_LayerType_enum {
#define LO_BLINK_GROUP_NAME "_BLINKGROUP" #define LO_BLINK_GROUP_NAME "_BLINKGROUP"
#define LO_CONTENT_LAYER_NAME "_CONTENT" #define LO_CONTENT_LAYER_NAME "_CONTENT"
#define LO_EMBED_LAYER_NAME "_EMBED" #define LO_EMBED_LAYER_NAME "_EMBED"
#ifdef SHACK
#define LO_BUILTIN_LAYER_NAME "_BUILTIN"
#endif /* SHACK */
#define LO_DOCUMENT_LAYER_ID 0 #define LO_DOCUMENT_LAYER_ID 0

Просмотреть файл

@ -72,6 +72,9 @@ FE_DEFINE(GetFormElementValue,void, (MWContext * context, LO_FormElementStruct *
FE_DEFINE(ResetFormElement,void, (MWContext * context, LO_FormElementStruct * form_element)) FE_DEFINE(ResetFormElement,void, (MWContext * context, LO_FormElementStruct * form_element))
FE_DEFINE(SetFormElementToggle,void, (MWContext * context, LO_FormElementStruct * form_element, XP_Bool toggle)) FE_DEFINE(SetFormElementToggle,void, (MWContext * context, LO_FormElementStruct * form_element, XP_Bool toggle))
FE_DEFINE(FreeEmbedElement,void, (MWContext *context, LO_EmbedStruct *)) FE_DEFINE(FreeEmbedElement,void, (MWContext *context, LO_EmbedStruct *))
#ifdef SHACK
FE_DEFINE(FreeBuiltinElement,void, (MWContext *context, LO_BuiltinStruct *))
#endif
FE_DEFINE(CreateEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app)) FE_DEFINE(CreateEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app))
FE_DEFINE(SaveEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app)) FE_DEFINE(SaveEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app))
FE_DEFINE(RestoreEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app)) FE_DEFINE(RestoreEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app))
@ -83,6 +86,9 @@ FE_DEFINE(FormTextIsSubmit,void, (MWContext * context, LO_FormElementStruct * fo
FE_DEFINE(DisplaySubtext,void, (MWContext * context, int iLocation, LO_TextStruct *text, int32 start_pos, int32 end_pos, XP_Bool need_bg)) FE_DEFINE(DisplaySubtext,void, (MWContext * context, int iLocation, LO_TextStruct *text, int32 start_pos, int32 end_pos, XP_Bool need_bg))
FE_DEFINE(DisplayText,void, (MWContext * context, int iLocation, LO_TextStruct *text, XP_Bool need_bg)) FE_DEFINE(DisplayText,void, (MWContext * context, int iLocation, LO_TextStruct *text, XP_Bool need_bg))
FE_DEFINE(DisplayEmbed,void, (MWContext * context, int iLocation ,LO_EmbedStruct *embed_struct)) FE_DEFINE(DisplayEmbed,void, (MWContext * context, int iLocation ,LO_EmbedStruct *embed_struct))
#ifdef SHACK
FE_DEFINE(DisplayBuiltin,void, (MWContext * context, int iLocation ,LO_BuiltinStruct *builtin_struct))
#endif
FE_DEFINE(DisplayJavaApp,void, (MWContext * context, int iLocation ,LO_JavaAppStruct *java_struct)) FE_DEFINE(DisplayJavaApp,void, (MWContext * context, int iLocation ,LO_JavaAppStruct *java_struct))
FE_DEFINE(DisplayEdge,void, (MWContext * context, int iLocation ,LO_EdgeStruct *edge_struct)) FE_DEFINE(DisplayEdge,void, (MWContext * context, int iLocation ,LO_EdgeStruct *edge_struct))
FE_DEFINE(DisplayTable,void, (MWContext * context, int iLocation ,LO_TableStruct *table_struct)) FE_DEFINE(DisplayTable,void, (MWContext * context, int iLocation ,LO_TableStruct *table_struct))

Просмотреть файл

@ -89,6 +89,9 @@ typedef struct LO_ImageAttr_struct LO_ImageAttr;
typedef struct LO_ImageStruct_struct LO_ImageStruct; typedef struct LO_ImageStruct_struct LO_ImageStruct;
typedef struct LO_SubDocStruct_struct LO_SubDocStruct; typedef struct LO_SubDocStruct_struct LO_SubDocStruct;
typedef struct LO_EmbedStruct_struct LO_EmbedStruct; typedef struct LO_EmbedStruct_struct LO_EmbedStruct;
#ifdef SHACK
typedef struct LO_BuiltinStruct_struct LO_BuiltinStruct;
#endif /* SHACK */
typedef struct LO_JavaAppStruct_struct LO_JavaAppStruct; typedef struct LO_JavaAppStruct_struct LO_JavaAppStruct;
typedef struct LO_EdgeStruct_struct LO_EdgeStruct; typedef struct LO_EdgeStruct_struct LO_EdgeStruct;
typedef struct LO_ObjectStruct_struct LO_ObjectStruct; typedef struct LO_ObjectStruct_struct LO_ObjectStruct;

Просмотреть файл

@ -1,105 +0,0 @@
/*0*/ "",
/*1*/ "TITLE",
/*2*/ "ISINDEX",
/*3*/ "BASE",
/*4*/ "LINK",
/*5*/ "H1",
/*6*/ "H2",
/*7*/ "H3",
/*8*/ "H4",
/*9*/ "H5",
/*10*/ "H6",
/*11*/ "A",
/*12*/ "P",
/*13*/ "ADDRESS",
/*14*/ "IMG",
/*15*/ "PLAINTEXT",
/*16*/ "XMP",
/*17*/ "PRE",
/*18*/ "LISTING",
/*19*/ "UL",
/*20*/ "OL",
/*21*/ "MENU",
/*22*/ "DIR",
/*23*/ "LI",
/*24*/ "DL",
/*25*/ "DT",
/*26*/ "DD",
/*27*/ "STRIKE",
/*28*/ "TT",
/*29*/ "B",
/*30*/ "I",
/*31*/ "EM",
/*32*/ "STRONG",
/*33*/ "CODE",
/*34*/ "SAMP",
/*35*/ "KBD",
/*36*/ "VAR",
/*37*/ "CITE",
/*38*/ "BLOCKQUOTE",
/*39*/ "FORM",
/*40*/ "INPUT",
/*41*/ "SELECT",
/*42*/ "OPTION",
/*43*/ "TEXTAREA",
/*44*/ "HR",
/*45*/ "BR",
/*46*/ "WBR",
/*47*/ "NOBR",
/*48*/ "BASEFONT",
/*49*/ "FONT",
/*50*/ "BLINK",
/*51*/ "IMAGE",
/*52*/ "CENTER",
/*53*/ "SUBDOC",
/*54*/ "CELL",
/*55*/ "TABLE",
/*56*/ "CAPTION",
/*57*/ "TR",
/*58*/ "TH",
/*59*/ "TD",
/*60*/ "EMBED",
/*61*/ "BODY",
/*62*/ "META",
/*63*/ "COLORMAP",
/*64*/ "HYPE",
/*65*/ "BIG",
/*66*/ "SMALL",
/*67*/ "SUP",
/*68*/ "SUB",
/*69*/ "FRAMESET",
/*70*/ "FRAME",
/*71*/ "NOFRAMES",
/*72*/ "APPLET",
/*73*/ "PARAM",
/*74*/ "MAP",
/*75*/ "AREA",
/*76*/ "DIV",
/*77*/ "KEYGEN",
/*78*/ "SCRIPT",
/*79*/ "NOSCRIPT",
/*80*/ "NOEMBED",
/*81*/ "HEAD",
/*82*/ "HTML",
/*83*/ "SERVER",
/*84*/ "CERTIFICATE",
/*85*/ "ILAYER",
/*86*/ "S",
/*87*/ "U",
/*88*/ "SPACER",
/*89*/ "MULTICOL",
/*90*/ "NSCP_CLOSE",
/*91*/ "NSCP_OPEN",
/*92*/ "",
/*93*/ "LAYER",
/*94*/ "STYLE",
/*95*/ "MQUOTE",
/*96*/ "SPAN",
/*97*/ "SPELL",
/*98*/ "INLINEINPUT",
/*99*/ "NSCP_REBLOCK",
/*100*/ "OBJECT",
/*101*/ "NSDT",
/*102*/ "JEAN",
/*103*/ "CHARLES",
/*104*/ "NOLAYER",

Просмотреть файл

@ -127,6 +127,9 @@
#define PT_NSDT "nsdt" #define PT_NSDT "nsdt"
#define PT_INLINEINPUTTHICK "jean" #define PT_INLINEINPUTTHICK "jean"
#define PT_INLINEINPUTDOTTED "charles" #define PT_INLINEINPUTDOTTED "charles"
#ifdef SHACK
#define PT_BUILTIN "builtin"
#endif
/*************** /***************
* Unique IDs to identify * Unique IDs to identify
@ -242,7 +245,10 @@
#define P_INLINEINPUTTHICK 102 #define P_INLINEINPUTTHICK 102
#define P_INLINEINPUTDOTTED 103 #define P_INLINEINPUTDOTTED 103
#define P_NOLAYER 104 #define P_NOLAYER 104
#define P_MAX 105 #ifdef SHACK
#define P_BUILTIN 105
#endif
#define P_MAX 106
/***************** /*****************
* These define all the strings that match * These define all the strings that match