aboutsummaryrefslogtreecommitdiff
path: root/layout.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2020-09-25 10:58:13 -0400
committerJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2020-09-25 10:58:13 -0400
commite302c5cfcc30aa1b2e49ad5aa1fb524871618e43 (patch)
tree1643e697a4bb8d913dfc747e91de1405dc2ef827 /layout.f90
parente04bc46c5dfc33ed5d2f967a59176e3da0556904 (diff)
downloadLR-87-e302c5cfcc30aa1b2e49ad5aa1fb524871618e43.zip
LR-87-e302c5cfcc30aa1b2e49ad5aa1fb524871618e43.tar.gz
Added a homepage on Windows that showcases AppGraphics.
Diffstat (limited to 'layout.f90')
-rw-r--r--layout.f9045
1 files changed, 22 insertions, 23 deletions
diff --git a/layout.f90 b/layout.f90
index 73c085c..9946fd9 100644
--- a/layout.f90
+++ b/layout.f90
@@ -55,31 +55,30 @@ contains
call rendering_engine%prepare_for_layout()
do while(laying_out)
-
if(walker%line_type == line_type_text .and. .not. associated(walker%breaks)) then
walker%breaks => calculate_wrapping(rendering_engine, walker%text)
end if
-
+
select case (walker%line_type)
-
+
case (line_type_text)
call render_proportional(rendering_engine, walker%text, walker%breaks)
-
+
case (line_type_preformatted)
call render_preformatted(rendering_engine, walker%text)
-
+
case (line_type_link)
call render_link(rendering_engine, walker%text)
-
+
end select
-
+
laying_out = associated(walker%next)
if(laying_out) then
walker => walker%next
end if
-
+
end do
-
+
end subroutine layout_lines
subroutine clear_line_breaks(first_line)
@@ -89,44 +88,44 @@ contains
type(line), pointer::walker
walker => first_line
-
+
do while(associated(walker))
if(associated(walker%breaks)) then
deallocate(walker%breaks)
walker%breaks => null()
end if
-
+
walker => walker%next
-
+
end do
-
+
end subroutine clear_line_breaks
subroutine free_lines(first_line)
implicit none
-
+
type(line), intent(inout), pointer::first_line
-
+
type(line), pointer::walker, past
-
+
call clear_line_breaks(first_line)
-
+
walker => first_line
-
+
do while(associated(walker))
if(allocated(walker%text)) then
deallocate(walker%text)
end if
-
+
past => walker
walker => walker%next
-
+
deallocate(past)
-
+
end do
-
+
first_line => null()
-
+
end subroutine free_lines
end module layout \ No newline at end of file