Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vdelachaux committed Apr 20, 2020
0 parents commit d32e9de
Show file tree
Hide file tree
Showing 202 changed files with 26,130 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# ====================================================================
# Basic .gitattributes for a 4D repo.
# ====================================================================

* text=auto

# ====================================================================
# The above will handle all files NOT found below
# ====================================================================

# These files are text and should be normalized (Convert crlf => lf)
#.gitattributes text linguist-language=gitattributes
#.gitignore text
*.md text
*.ini text
*.xlf text diff=xml

# SVG treated as text.
# If you want to treat it as binary,comment the next line.
*.svg text diff=xml

# Source files
*.4DProject text linguist-language=4d diff=json
*.4DCatalog text linguist-language=4d diff=xml
*.4DSettings text linguist-language=4d diff=xml
*.4DForm text linguist-language=4d diff=json
*.4dm text linguist-language=4d
*.4lbp text linguist-language=4d diff=xml
*.4df text linguist-language=4d diff=json

# ====================================================================
# Binary
# ====================================================================
*.4DZ binary linguist-language=4d
*.4DD binary linguist-language=4d
*.4DIndy binary linguist-language=4d
*.Match binary linguist-language=4d
*.4DIndx binary linguist-language=4d
*.4[dD][bB] binary linguist-language=4d
*.[dD][aA][tT][aA] binary linguist-language=4d
*.4lb binary linguist-language=4d
*.4qr binary linguist-language=4d
46 changes: 46 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#--------------------------------
# Ignore invisible files/folders
#--------------------------------
.*
!.git*
.git/

#--------------------------------
# Ignore data file
#--------------------------------
[dD][aA][tT][aA]/
*.4DD
*.journal
*.4DIndx
*.Match

#--------------------------------
# Ignore derived data
#--------------------------------
Project/DerivedData/

#--------------------------------
# Ignore logs
#--------------------------------
Logs/

#--------------------------------
# Ignore settings & preferences
#--------------------------------
Preferences/
!4DPop AppMaker.*
Settings/
#!buildApp.4DSettings
userPreferences.*/

#--------------------------------
# Miscellaneous
#--------------------------------
*__Orphan__*
*symbols.txt
ehthumbs.db
Thumbs.db

#--------------------------------
# Added by user
#--------------------------------
12 changes: 12 additions & 0 deletions Project/Sources/DatabaseMethods/onStartup.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

svgEdit

//Run 4DPop
//This code is available even if the component is not present like in the final application.
If (Not:C34(Is compiled mode:C492))
ARRAY TEXT:C222($tTxt_Components;0)
COMPONENT LIST:C1001($tTxt_Components)
If (Find in array:C230($tTxt_Components;"4DPop")>0)
EXECUTE METHOD:C1007("4DPop_Palette")
End if
End if
1 change: 1 addition & 0 deletions Project/Sources/Forms/svgEdit/ObjectMethods/Bouton 3D.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
svgEdit_menu_file
1 change: 1 addition & 0 deletions Project/Sources/Forms/svgEdit/ObjectMethods/Bouton 3D1.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
svgEdit_menu_Edit
21 changes: 21 additions & 0 deletions Project/Sources/Forms/svgEdit/ObjectMethods/Bouton 3D2.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
C_TEXT:C284($kTxt_webArea;$Txt_buffer;$Txt_dummy)

$kTxt_webArea:="WebArea"


WA EXECUTE JAVASCRIPT FUNCTION:C1043(*;$kTxt_webArea;"svgCanvas.setLang";*;Get database localization:C1009)

//$kTxt_webArea:="WebArea"
//
//
//$Txt_buffer:="svgCanvas.selectedElement != null;"
//$Txt_dummy:=WA Executer JavaScript(*;$kTxt_webArea;$Txt_buffer)
//
//$Txt_dummy:=WA Executer JavaScript(*;$kTxt_webArea;"svgCanvas.getImageTitle();")


//$Txt_dummy:=WA Executer JavaScript(*;$kTxt_webArea;"svgCanvas.open();")

//$Txt_HTML:=""
//$Txt_HTML:=$Txt_HTML+"function() {if (selectedElements[0] == null) { return; }return(true);};"
//$Txt_dummy:=WA Executer JavaScript(*;$Txt_webArea;$Txt_HTML)
63 changes: 63 additions & 0 deletions Project/Sources/Forms/svgEdit/ObjectMethods/WebArea.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
C_LONGINT:C283($Lon_formEvent)
C_TEXT:C284($kTxt_webArea;$Txt_dummy;$Txt_url)

$Lon_formEvent:=Form event code:C388
$kTxt_webArea:="WebArea"

Case of
//______________________________________________________
: ($Lon_formEvent=On Load:K2:1)

svgEdit_init ($kTxt_webArea)

//______________________________________________________
: ($Lon_formEvent=On Begin URL Loading:K2:45)

//______________________________________________________
: ($Lon_formEvent=On URL Resource Loading:K2:46)

//______________________________________________________
: ($Lon_formEvent=On End URL Loading:K2:47)

//Set the language
WA EXECUTE JAVASCRIPT FUNCTION:C1043(*;$kTxt_webArea;"svgCanvas.setLang";*;Get database localization:C1009)

//Set the window title
SET WINDOW TITLE:C213("SVG-edit - "+WA Evaluate JavaScript:C1029(*;$kTxt_webArea;"svgCanvas.getVersion();");Current form window:C827)

If (Shift down:C543) // Firebug Installation

webarea_firebug_nit ($kTxt_webArea)

End if

//______________________________________________________
: ($Lon_formEvent=On URL Loading Error:K2:48)

TRACE:C157

$Txt_url:=WA Get current URL:C1025(*;$kTxt_webArea)

//______________________________________________________
: ($Lon_formEvent=On URL Filtering:K2:49)

TRACE:C157

$Txt_url:=WA Get last filtered URL:C1035(*;$kTxt_webArea)

//______________________________________________________
: ($Lon_formEvent=On Open External Link:K2:50)

TRACE:C157

//______________________________________________________
: ($Lon_formEvent=On Window Opening Denied:K2:51)

OPEN URL:C673(WA Get last filtered URL:C1035(*;$kTxt_webArea))

Else

TRACE:C157

//______________________________________________________
End case
133 changes: 133 additions & 0 deletions Project/Sources/Forms/svgEdit/form.4DForm
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"destination": "detailScreen",
"windowTitle": "SVG-edit",
"windowMinWidth": 700,
"windowMinHeight": 520,
"width": 700,
"height": 520,
"markerHeader": 15,
"markerBody": 200,
"markerBreak": 220,
"markerFooter": 240,
"events": [
"onLoad",
"onCloseBox"
],
"method": "method.4dm",
"pageFormat": {
"paperName": "A4",
"paperWidth": "595pt",
"paperHeight": "842pt"
},
"pages": [
{
"objects": {
"Bouton 3D": {
"type": "button",
"top": 0,
"left": 3,
"width": 52,
"height": 19,
"dataSource": "menuFile",
"fontFamily": "Lucida Grande Bold",
"fontSize": 11,
"fontWeight": "bold",
"focusable": false,
"text": "Fichier",
"popupPlacement": "linked",
"style": "toolbar",
"method": "ObjectMethods/Bouton 3D.4dm",
"events": [
"onClick"
]
},
"Bouton 3D1": {
"type": "button",
"top": 0,
"left": 61,
"width": 52,
"height": 19,
"dataSource": "menuEdit",
"fontFamily": "Lucida Grande Bold",
"fontSize": 11,
"fontWeight": "bold",
"focusable": false,
"text": "Edition",
"popupPlacement": "linked",
"style": "toolbar",
"method": "ObjectMethods/Bouton 3D1.4dm",
"events": [
"onClick"
]
},
"Bouton 3D2": {
"type": "button",
"top": 0,
"left": 117,
"width": 52,
"height": 19,
"fontFamily": "Lucida Grande Bold",
"fontSize": 11,
"fontWeight": "bold",
"focusable": false,
"text": "Test",
"popupPlacement": "linked",
"style": "toolbar",
"method": "ObjectMethods/Bouton 3D2.4dm",
"events": [
"onClick"
]
},
"Ligne": {
"type": "line",
"top": 19,
"left": 0,
"width": 700,
"sizingX": "grow"
}
}
},
{
"objects": {
"WebArea": {
"type": "webArea",
"top": 21,
"left": 0,
"width": 700,
"height": 499,
"sizingX": "grow",
"sizingY": "grow",
"dataSource": "WebArea",
"urlSource": "WebArea_url",
"progressSource": "WebArea_progress",
"method": "ObjectMethods/WebArea.4dm",
"events": [
"onLoad",
"onBeginURLLoading",
"onURLResourceLoading",
"onEndURLLoading",
"onURLLoadingError",
"onURLFiltering",
"onOpenExternalLink",
"onWindowOpeningDenied"
]
}
}
}
],
"editor": {
"activeView": "View 1",
"defaultView": "View 1",
"views": {
"View 1": {},
"View 2": {},
"View 3": {},
"View 4": {},
"View 5": {},
"View 6": {},
"View 7": {},
"View 8": {},
"View 9": {}
}
}
}
39 changes: 39 additions & 0 deletions Project/Sources/Forms/svgEdit/method.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// ----------------------------------------------------
// Method :
// Created 14/01/10 by Vincent de Lachaux
// ----------------------------------------------------
// Description
//
// ----------------------------------------------------
// Declarations
C_LONGINT:C283($Lon_event)

// ----------------------------------------------------
// Initialisations
$Lon_event:=Form event code:C388

// ----------------------------------------------------

Case of
//______________________________________________________
: ($Lon_event=On Load:K2:1)

Compiler_svgEdit

CLEAR VARIABLE:C89(svgEdit_Txt_path)

//______________________________________________________
: ($Lon_event=On Close Box:K2:21)

svgEdit_close ("WebArea")

CANCEL:C270

//______________________________________________________
: (False:C215)

//______________________________________________________
Else

//______________________________________________________
End case
Loading

0 comments on commit d32e9de

Please sign in to comment.