version 1.139, 2007/05/10 09:34:01
|
version 1.140, 2007/05/10 10:48:51
|
Line 13
|
Line 13
|
#define THOT_EXPORT extern |
#define THOT_EXPORT extern |
#include "amaya.h" |
#include "amaya.h" |
#include "document.h" |
#include "document.h" |
|
|
#include "undo.h" |
#include "undo.h" |
|
|
#include "containers.h" |
#include "containers.h" |
#include "Elemlist.h" |
#include "Elemlist.h" |
#include "templates.h" |
#include "templates.h" |
Line 24
|
Line 22
|
#ifdef TEMPLATES |
#ifdef TEMPLATES |
#include "Template.h" |
#include "Template.h" |
#include "templateDeclarations.h" |
#include "templateDeclarations.h" |
|
|
|
#include "html2thot_f.h" |
#include "templates_f.h" |
#include "templates_f.h" |
#include "templateUtils_f.h" |
#include "templateUtils_f.h" |
|
|
#include "templateLoad_f.h" |
#include "templateLoad_f.h" |
#include "templateDeclarations_f.h" |
#include "templateDeclarations_f.h" |
#include "templateInstantiate_f.h" |
#include "templateInstantiate_f.h" |
Line 741 Element Template_InsertBagChild (Documen
|
Line 740 Element Template_InsertBagChild (Documen
|
newElType.ElTypeNum = Template_EL_useEl; |
newElType.ElTypeNum = Template_EL_useEl; |
else |
else |
newElType.ElTypeNum = Template_EL_useSimple; |
newElType.ElTypeNum = Template_EL_useSimple; |
|
if (decl->blockLevel && !IsTemplateElement (el)) |
|
{ |
|
// force the insertion of a block level element at the right position |
|
while (el && IsCharacterLevelElement (el)) |
|
el = TtaGetParent (el); |
|
if (el) |
|
TtaSelectElement (doc, el); |
|
TtaInsertAnyElement (doc, FALSE); |
|
} |
TtaInsertElement (newElType, doc); |
TtaInsertElement (newElType, doc); |
TtaGiveFirstSelectedElement (doc, &sel, &start, &end); |
TtaGiveFirstSelectedElement (doc, &sel, &start, &end); |
if (sel) |
if (sel) |
Line 1337 ThotBool ClosingInstance(NotifyDialog* d
|
Line 1344 ThotBool ClosingInstance(NotifyDialog* d
|
IsTemplateElement |
IsTemplateElement |
Test if an element is a template element. |
Test if an element is a template element. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
ThotBool IsTemplateElement(Element elem) |
ThotBool IsTemplateElement (Element elem) |
{ |
{ |
#ifdef TEMPLATES |
#ifdef TEMPLATES |
ElementType elType; |
ElementType elType; |