Skip to content

Commit

Permalink
Buttons insertbreaks with submenus (both toobar and sidebar)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roland-Lannuzel committed Jan 9, 2024
1 parent 39ccf1b commit f92e2e0
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Case of
: (Form event code:C388=On Clicked:K2:4)
MENU_Display("ContinuousSections")
End case
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

Case of
: (Form event code:C388=On Clicked:K2:4)
MENU_Display("Sections")
End case
28 changes: 19 additions & 9 deletions Project/Sources/Forms/WP_Palette_Alignments/form.4DForm
Original file line number Diff line number Diff line change
Expand Up @@ -587,18 +587,23 @@
"iconFrames": 4,
"style": "toolbar"
},
"btn_insertSectiobBreak": {
"btn_insertSectionBreak": {
"type": "button",
"top": 502,
"left": 208,
"width": 29,
"height": 24,
"tooltip": ":xliff:insertSectionbreak",
"action": "insertSectionBreak",
"action": "",
"focusable": false,
"icon": "/RESOURCES/Images/Sidebar/SectionBreak_24.png",
"iconFrames": 4,
"style": "toolbar"
"style": "toolbar",
"popupPlacement": "separated",
"events": [
"onClick"
],
"method": "ObjectMethods/btn_insertSectionBreak.4dm"
},
"btn_insertColumnBreak": {
"type": "button",
Expand All @@ -613,18 +618,23 @@
"iconFrames": 4,
"style": "toolbar"
},
"btn_insertPageBreak1": {
"btn_insertContinousSectionBreak": {
"type": "button",
"top": 502,
"left": 148,
"width": 29,
"height": 24,
"tooltip": ":xliff:insertContinuousSectionBreak",
"action": "insertContinuousSectionBreak",
"action": "",
"focusable": false,
"icon": "/RESOURCES/Images/Sidebar/ContinuousSectionBreak_24.png",
"iconFrames": 4,
"style": "toolbar"
"style": "toolbar",
"events": [
"onClick"
],
"method": "ObjectMethods/btn_insertContinousSectionBreak.4dm",
"popupPlacement": "linked"
},
"Separator3": {
"type": "rectangle",
Expand Down Expand Up @@ -1126,9 +1136,9 @@
"textLineHeightInput",
"btn_etc",
"btn_insertPageBreak",
"btn_insertSectiobBreak",
"btn_insertSectionBreak",
"btn_insertColumnBreak",
"btn_insertPageBreak1",
"btn_insertContinousSectionBreak",
"Popup_columnCount",
"btn_etc1",
"Popup Dropdown List2",
Expand Down Expand Up @@ -1207,5 +1217,5 @@
"version": "1",
"kind": "form"
},
"geometryStamp": 3373
"geometryStamp": 3379
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

Case of
: (Form event code:C388=On Clicked:K2:4)
MENU_Display("ContinuousSections")

End case
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

Case of
: (Form event code:C388=On Clicked:K2:4)
MENU_Display("Sections")

End case
66 changes: 52 additions & 14 deletions Project/Sources/Forms/WP_Toolbar/form.4DForm
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@
},
"btn_insertPageBreak": {
"type": "button",
"top": 40,
"top": 30,
"left": 385,
"width": 40,
"height": 40,
Expand All @@ -1458,18 +1458,23 @@
"iconFrames": 4,
"style": "toolbar"
},
"btn_insertSectiobBreak": {
"btn_insertSectionBreak": {
"type": "button",
"top": 40,
"top": 30,
"left": 465,
"width": 40,
"height": 40,
"tooltip": ":xliff:insertSectionbreak",
"action": "insertSectionBreak",
"action": "",
"focusable": false,
"icon": "/RESOURCES/Images/Toolbar1/Insert/SectionBreak_32.png",
"iconFrames": 4,
"style": "toolbar"
"style": "toolbar",
"popupPlacement": "separated",
"events": [
"onClick"
],
"method": "ObjectMethods/btn_insertSectionBreak.4dm"
},
"btn_insertImage": {
"type": "button",
Expand Down Expand Up @@ -1774,7 +1779,7 @@
},
"btn_insertColumnBreak": {
"type": "button",
"top": 40,
"top": 30,
"left": 345,
"width": 40,
"height": 40,
Expand Down Expand Up @@ -1930,18 +1935,23 @@
"tooltip": ":xliff:RemoveSoftHyphen",
"action": "removeSoftHyphens"
},
"btn_insertPageBreak1": {
"btn_insertContinuousSectionBreak": {
"type": "button",
"top": 40,
"top": 30,
"left": 425,
"width": 40,
"height": 40,
"tooltip": ":xliff:insertContinuousSectionBreak",
"action": "insertContinuousSectionBreak",
"action": "",
"focusable": false,
"icon": "/RESOURCES/Images/Toolbar1/Insert/ContinuousSectionBreak_32.png",
"iconFrames": 4,
"style": "toolbar"
"style": "toolbar",
"events": [
"onClick"
],
"method": "ObjectMethods/btn_insertContinuousSectionBreak.4dm",
"popupPlacement": "linked"
},
"btn_insertTime3": {
"type": "button",
Expand Down Expand Up @@ -2024,6 +2034,32 @@
"popupPlacement": "separated",
"icon": "/RESOURCES/Images/TBcommon/Insert/InsertTextBox_32.png",
"method": "ObjectMethods/btn_insertTextArea.4dm"
},
"cb_distinctFirstPage": {
"type": "checkbox",
"text": "differentFirstPage",
"top": 345,
"left": 452,
"width": 158,
"height": 11,
"events": [
"onClick"
],
"action": "section/differentFirstPage",
"dataSourceTypeHint": "boolean"
},
"cb_distinctLeftRightPage": {
"type": "checkbox",
"text": "differentLeftRightPages",
"top": 358,
"left": 452,
"width": 158,
"height": 11,
"events": [
"onClick"
],
"action": "section/differentLeftRightPages",
"dataSourceTypeHint": "boolean"
}
},
"entryOrder": [
Expand All @@ -2035,7 +2071,7 @@
"VirtualExpression",
"TrueExpression",
"btn_insertPageBreak",
"btn_insertSectiobBreak",
"btn_insertSectionBreak",
"btn_insertImage",
"btn_insertPageCount",
"btn_insertPageNumber",
Expand All @@ -2055,11 +2091,13 @@
"btn_showHide4Dexpressions",
"btn_insertColumnBreak",
"btn_visibleVerticalRuler",
"btn_insertPageBreak1",
"btn_insertContinuousSectionBreak",
"btn_insertTime3",
"btn_visibleEmptyImages",
"btn_displayAsSymbol",
"btn_insertTextArea"
"btn_insertTextArea",
"cb_distinctFirstPage",
"cb_distinctLeftRightPage"
]
},
{
Expand Down Expand Up @@ -4557,5 +4595,5 @@
"View 9": {}
}
},
"geometryStamp": 6926
"geometryStamp": 7042
}
2 changes: 2 additions & 0 deletions Project/Sources/Forms/WP_Toolbar/method.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ Case of
OBJECT SET HELP TIP:C1181(*; "btn_ImageWrapSquareRight"; Get action info:C1442("anchorLayout?value=wrapSquareRight").title)
OBJECT SET HELP TIP:C1181(*; "btn_ImageWrapSquareLargest"; Get action info:C1442("anchorLayout?value=wrapSquareLargest").title)

OBJECT SET TITLE:C194(*; "cb_distinctFirstPage"; Get action info:C1442("section/differentFirstPage").title)
OBJECT SET TITLE:C194(*; "cb_distinctLeftRightPage"; Get action info:C1442("section/differentLeftRightPages").title)

If (Form:C1466#Null:C1517)
SET TIMER:C645(-1) // IF events are NOT managed in the area, then Form will be null (ACI0102661)
Expand Down
26 changes: 26 additions & 0 deletions Project/Sources/Methods/MENU_Display.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,32 @@ Case of
End if

End if
: ($content="Sections")

APPEND MENU ITEM:C411($menu; ak standard action title:K76:83)
SET MENU ITEM PROPERTY:C973($menu; -1; Associated standard action:K56:1; "insertSectionBreak")

APPEND MENU ITEM:C411($menu; "-")

APPEND MENU ITEM:C411($menu; ak standard action title:K76:83)
SET MENU ITEM PROPERTY:C973($menu; -1; Associated standard action:K56:1; "section/differentFirstPage")

APPEND MENU ITEM:C411($menu; ak standard action title:K76:83)
SET MENU ITEM PROPERTY:C973($menu; -1; Associated standard action:K56:1; "section/differentLeftRightPages")

: ($content="ContinuousSections")

APPEND MENU ITEM:C411($menu; ak standard action title:K76:83)
SET MENU ITEM PROPERTY:C973($menu; -1; Associated standard action:K56:1; "insertContinuousSectionBreak")

APPEND MENU ITEM:C411($menu; "-")

APPEND MENU ITEM:C411($menu; ak standard action title:K76:83)
SET MENU ITEM PROPERTY:C973($menu; -1; Associated standard action:K56:1; "section/differentFirstPage")

APPEND MENU ITEM:C411($menu; ak standard action title:K76:83)
SET MENU ITEM PROPERTY:C973($menu; -1; Associated standard action:K56:1; "section/differentLeftRightPages")


End case

Expand Down
4 changes: 2 additions & 2 deletions Project/Sources/catalog.4DCatalog
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE base SYSTEM "http://www.4d.com/dtd/2007/base.dtd" >
<base name="4D WritePro Interface" uuid="94CC57D4DD674D83A19AD1955D22A833" collation_locale="en">
<base name="4D WritePro Interface" uuid="94CC57D4DD674D83A19AD1955D22A833" collation_locale="fr">
<schema name="DEFAULT_SCHEMA"/>
<table name="Sample" uuid="FCDC2942AAC24F1C8E119520A0C6B44B" id="1">
<field name="ID" uuid="25E1AC17AE3D4D5FBED8BEFDB6E6B6DC" type="4" unique="true" autosequence="true" not_null="true" id="1"/>
Expand All @@ -14,7 +14,7 @@
<field name="title" uuid="19F64DF6BDDD4615A1EEC9F1978DBD56" type="10" limiting_length="255" never_null="true" id="3"/>
<field name="group" uuid="47208754D7924C1E8357A182DBB2A1CC" type="3" never_null="true" id="4"/>
<primary_key field_name="ID" field_uuid="25E1AC17AE3D4D5FBED8BEFDB6E6B6DC"/>
<table_extra input_form="InputSideBar" output_form="Output">
<table_extra input_form="InputToolBar" output_form="Output">
<editor_table_info displayable_fields_count="6">
<color red="255" green="255" blue="255" alpha="0"/>
<coordinates left="41.5" top="16.453125" width="120" height="167.33203125"/>
Expand Down

0 comments on commit f92e2e0

Please sign in to comment.