2021-06-15 04:24:42 +02:00
# tfe5 source files
2020-12-22 03:30:06 +01:00
2021-06-19 08:52:24 +02:00
## How to compile and execute the text editor 'tfe'.
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
First, source files are shown in the later subsections.
How to download them is written at the end of the [previous section ](sec15.src.md ).
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
The following is the instruction of compilation and execution.
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
- You need meson and ninja.
2021-06-19 08:52:24 +02:00
- Set environment variables if necessary.
If you have installed gtk4 from the source and you preferred the option `--prefix $HOME/local` (see [Section 2 ](sec2.src.md )), type `. env.sh` to set the environment variables.
~~~
$ . env.sh
~~~
2021-06-15 04:24:42 +02:00
- change your current directory to `src/tfe5` directory.
- type `meson _build` for configuration.
- type `ninja -C _build` for compilation.
2021-06-19 08:52:24 +02:00
Then the application `tfe` is built under the `_build` directory.
2021-06-15 04:24:42 +02:00
- type `_build/tfe` to execute it.
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
Then the window appears.
There are four buttons, `New` , `Open` , `Save` and `Close` .
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
- Click on `Open` button, then a FileChooserDialog appears.
Choose a file in the list and click on `Open` button.
Then the file is read and a new Notebook Page appears.
- Edit the file and click on `Save` button, then the text is saved to the original file.
- Click `Close` , then the Notebook Page disappears.
- Click `Close` again, then the `Untitled` Notebook Page disappears and at the same time the application quits.
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
This is a very simple editor.
It is a good practice for you to add more features.
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
## meson.build
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
@@@include
tfe5/meson.build
@@@
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
## tfe.gresource.xml
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
@@@include
tfe5/tfe.gresource.xml
@@@
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
## tfe.ui
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
@@@include
tfe5/tfe.ui
@@@
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
## tfe.h
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
@@@include
tfe5/tfe.h
@@@
2021-01-13 05:29:35 +01:00
2021-06-15 04:24:42 +02:00
## tfeapplication.c
2021-01-13 05:29:35 +01:00
2021-06-15 04:24:42 +02:00
@@@include
tfe5/tfeapplication.c
@@@
2021-01-13 05:29:35 +01:00
2021-06-15 04:24:42 +02:00
## tfenotebook.h
2021-01-13 05:29:35 +01:00
2021-06-15 04:24:42 +02:00
@@@include
tfe5/tfenotebook.h
@@@
2020-12-22 03:30:06 +01:00
2021-06-15 04:24:42 +02:00
## tfenotebook.c
2021-01-13 05:29:35 +01:00
2021-06-15 04:24:42 +02:00
@@@include
tfe5/tfenotebook.c
@@@
2021-01-13 05:29:35 +01:00
2021-06-15 04:24:42 +02:00
## tfetextview.h
2021-01-13 05:29:35 +01:00
2021-06-15 04:24:42 +02:00
@@@include
tfetextview/tfetextview.h
@@@
2021-01-13 05:29:35 +01:00
2021-06-15 04:24:42 +02:00
## tfetextview.c
2021-01-13 05:29:35 +01:00
2021-02-08 14:24:54 +01:00
@@@include
2021-06-15 04:24:42 +02:00
tfetextview/tfetextview.c
2021-02-08 14:24:54 +01:00
@@@
2021-01-13 05:29:35 +01:00
2021-06-15 04:24:42 +02:00
## Total number of lines, words and characters
@@@shell
LANG=C wc tfe5/meson.build tfe5/tfeapplication.c tfe5/tfe.gresource.xml tfe5/tfe.h tfe5/tfenotebook.c tfe5/tfenotebook.h tfetextview/tfetextview.c tfetextview/tfetextview.h tfe5/tfe.ui
@@@
2020-12-21 13:12:05 +01:00