Skip to content

Commit

Permalink
Add HDI examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Inzirillo committed Sep 1, 2020
1 parent f9edd1a commit 7ed8653
Show file tree
Hide file tree
Showing 70 changed files with 2,844 additions and 0 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- AJUI_CircularProgressBar.new ( ) -> instance of CircularProgressBar class -->

## Description

Exposes the CircularProgressBar class at the host base. Replace New AJUI_CircularProgressBar since V18R3.

```4d
AJUI_CircularProgressBar.new ( ) -> instance
```

| Parameter | Type | In/Out | Description |
| --------- | ------- | ------ | --------------------------------------- |
| instance | object  | out  | instance of CircularProgressBar class   |

## Example

```
C_Object ($mycpb)
//create a circular progessbar and call it
$mycpb:=AJUI_CircularProgressBar.new()
$mycpb.radius(70)
$mycpb.value(0)
$mycpb.animated(True)
$mycpb.name("circularPB")
$mycpb.draw()
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- AJUI_ProgressBar.new ( ) -> instance of ProgressBar class -->

## Description

Exposes the ProgressBar class at the host base. Replace New AJUI_ProgressBar since V18R3

```4d
AJUI_ProgressBar.new ( ) -> instance
```

| Parameter | Type | In/Out | Description |
| --------- | ------- | ------ | ------------------------------ |
| instance | object  | out  | instance of ProgressBar class  |

## Example

```4d
C_Object ($mypb)
//create a progessbar and call it
$mypb:=AJUI_ProgressBar.new()
$mypb.height(20)
$mypb.width(400)
$mypb.value(0)
$mypb.title("Step 0/3")
$mypb.animated(False)
$mypb.name("PB1")
$mypb.draw()
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- AJUI_ProgressBar_Info ( ) -> version -->

## Description

Show the version info of the component.

```4d
AJUI_ProgressBar_Info ( ) -> version
```

| Parameter |  Type | In/Out  | Description  |
| --------- | ----- | ------- | ------------------------------ |
| version | text  | out  | version info of the component  |

## Example

```4d
C_String($version)
$version:= AJUI_ProgressBar_Info () //AJUI ProgressBar (v18) : 1.1.1-Build20
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- New AJUI_CircularProgressBar ( ) -> instance -->

## Description

this method returns an object representing an instance of the circular progress bar. The object contains different properties and their default values as well as formulas to manipulate them.

```4d
New AJUI_CircularProgressBar ( ) -> instance
```

| Parameter |  Type | In/Out  | Description  |
| --------- | ------- | ------- | -------------------------------------- |
| instance | object  | out  | instance of AJUI_CircularProgressBar   |

## Example

```
C_Object ($mycpb)
//create a circular progessbar and call it
$mycpb:=New AJUI_CircularProgressBar
$mycpb.CPBExternalRadius(70)
$mycpb.CPBPercentValue(0)
$mycpb.CPBActivateAnimation(True)
$mycpb.CPBPictFormObjName("circularPB")
$mycpb.LaunchCircularProgressBar()
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- New AJUI_ProgressBar ( ) -> instance -->


## Description

This method returns an object representing an instance of the linear progress bar. The object contains different properties and their default values as well as formulas to manipulate them.

```4d
New AJUI_ProgressBar ( ) -> instance
```

| Parameter | Type | In/Out | Description |
| --------- | ---- | ------ | ----------- |
| instance | object | out | instance of AJUI_ProgressBar  |

## Example

```4d
C_Object ($mypb)
//create a progessbar and call it
$mypb:=New AJUI_ProgressBar
$mypb.PBAreaHeight(20)
$mypb.PBAreaWidth(400)
$mypb.PBPercentValue(0)
$mypb.PBTitle("Step 0/3")
$mypb.PBActivateAnimation(False)
$mypb.PBPictFormObjName("PB1")
$mypb.LaunchProgressBar()
```
4 changes: 4 additions & 0 deletions AJUI_ProgressBar_HDI/Project/AJUI_ProgressBar_HDI.4DProject
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$comment": "The project file let you override the location for most folders",
"compatibilityVersion": 1840
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
HDI_drawItCircularPB
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

Form:C1466.mycpb.abort()
Form:C1466.mycpb.value(0)

$self:=OBJECT Get pointer:C1124(Object named:K67:5;"runBarbershop_cb")

OBJECT SET TITLE:C194($self->;"Launch BarberShop")
OBJECT SET RGB COLORS:C628($self->;0x00FF;Background color none:K23:10)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OPEN URL:C673("https://ch-fr.4d.com/aj-suite")
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$evt:=Form event code:C388

Case of
: ($evt=On Clicked:K2:4)
HDI_drawItCircularPB

End case
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
HDI_drawItCircularPB
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
HDI_drawItCircularPB
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$evt:=Form event code:C388

Case of
: ($evt=On Clicked:K2:4)
HDI_drawItCircularPB

End case
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$linecap_popup_fo_ptr:=OBJECT Get pointer:C1124(Object named:K67:5;"linecap_popup_fo")
$cbpBarLinecap_fo_ptr:=OBJECT Get pointer:C1124(Object named:K67:5;"cbpBarLinecap_fo")
$evt:=Form event code:C388
Case of
: ($evt=On Load:K2:1)
$linecap_popup_fo_ptr->:=1

: ($evt=On Data Change:K2:15)
Form:C1466.mycpb.lineCap($linecap_popup_fo_ptr->{$linecap_popup_fo_ptr->})
HDI_drawItCircularPB
End case
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
C_POINTER:C301($self)
C_TEXT:C284($instanceName_t)

$self:=OBJECT Get pointer:C1124(Object current:K67:2)
$evt:=Form event code:C388
Case of
: ($evt=On Load:K2:1)
$self->:=1
OBJECT SET TITLE:C194($self->;"Launch BarberShop")
OBJECT SET RGB COLORS:C628($self->;0x00FF;Background color none:K23:10)

: ($evt=On Clicked:K2:4)
$instanceName_t:=Form:C1466.mycpb.name()

If (Storage:C1525.barbershop.run[$instanceName_t])
OBJECT SET TITLE:C194($self->;"Launch BarberShop")
OBJECT SET RGB COLORS:C628($self->;0x00FF;Background color none:K23:10)
Form:C1466.mycpb.abort()
Else
OBJECT SET TITLE:C194($self->;"Stop BarberShop")
OBJECT SET RGB COLORS:C628($self->;0x00FF0000;Background color none:K23:10)
Form:C1466.mycpb.title("Please")
Form:C1466.mycpb.subtitle("Wait")
Form:C1466.mycpb.barberShop()
End if

End case

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
$self:=OBJECT Get pointer:C1124(Object current:K67:2)

$evt:=Form event code:C388
Case of

: ($evt=On Load:K2:1)

ARRAY TEXT:C222($self->;0)
APPEND TO ARRAY:C911($self->;"none")
APPEND TO ARRAY:C911($self->;"Bold")
APPEND TO ARRAY:C911($self->;"Italic")
APPEND TO ARRAY:C911($self->;"Underline")
APPEND TO ARRAY:C911($self->;"Strikethrough")
$self->:=2

: ($evt=On Data Change:K2:15)
Form:C1466.mycpb.CPBFontStyle($self->{$self->})
HDI_drawItCircularPB

: ($evt=On Clicked:K2:4)
Form:C1466.mycpb.CPBFontStyle($self->{$self->})
HDI_drawItCircularPB

End case
Loading

0 comments on commit 7ed8653

Please sign in to comment.