[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-tree-slide 7e0064f6cb 004/144: Add slide-in visual eff
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-tree-slide 7e0064f6cb 004/144: Add slide-in visual effect |
Date: |
Tue, 18 Jan 2022 08:58:53 -0500 (EST) |
branch: elpa/org-tree-slide
commit 7e0064f6cbe8263d85c65332d41ac0e401a85be4
Author: Takaaki ISHIKAWA <takaxp@ieee.org>
Commit: Takaaki ISHIKAWA <takaxp@ieee.org>
Add slide-in visual effect
---
org-tree-slide.el | 70 ++++++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 62 insertions(+), 8 deletions(-)
diff --git a/org-tree-slide.el b/org-tree-slide.el
index 5e452be360..6f61068b85 100644
--- a/org-tree-slide.el
+++ b/org-tree-slide.el
@@ -24,6 +24,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; History:
+;; v1.2.1 (2011-10-30@16:10) # Add slide-in visual effect
;; v1.1.1 (2011-10-28@16:16) # Add functions to start and stop slide view
;; v1.0.0 (2011-09-28@20:59) # Release an init version
;;
@@ -40,14 +41,32 @@
(require 'org-timer)
-(defconst org-tree-slide "1.1.1"
+(defconst org-tree-slide "1.2.1"
"The version number of the org-tree-slide.el")
(defcustom tree-slide-title nil
- "Specify the title of presentation. The title is shown in a header area. If
this variable is nil, the name of current buffer will be displayed as a slide
title."
+ "Specify the title of presentation. The title is shown in a header area.
+ If this variable is nil, the name of current buffer will be displayed
+ as a slide title."
:type 'string
:group 'org-tree-slide)
+(defcustom tree-slide-auto-play-period 0
+ "If this variable is greater than 0, the slide show move to the next tree
+ automatically, and the value specify an interval."
+ :type 'float
+ :group 'org-tree-slide)
+
+(defcustom tree-slide-slide-in-effect t
+ "Using a visual effect of slide-in for displaying trees."
+ :type 'boolen
+ :group 'org-tree-slide)
+
+(defcustom tree-slide-slide-in-brank-lines 10
+ "Specify the number of brank lines, the slide will move from this line."
+ :type 'integer
+ :group 'org-tree-slide)
+
;(defcustom tree-slide-header-background-color "#FFFFFF"
; "Specify the color of header background."
; :type 'string
@@ -60,6 +79,7 @@
(define-key org-mode-map (kbd "C-x s p") 'tree-slide-play)
(define-key org-mode-map (kbd "C-x s s") 'tree-slide-stop)
+;(define-key org-mode-map (kbd "C-x s a") 'tree-slide-auto-play-start)
;(define-key org-mode-map (kbd "<f5>") 'org-narrow-to-subtree)
;(define-key org-mode-map (kbd "<S-f5>") 'widen)
@@ -107,16 +127,16 @@
(show-children)
(org-cycle-hide-drawers 'all)
(org-narrow-to-subtree)
- (show-slide-header))
+ (when tree-slide-slide-in-effect
+ (tree-slide-slide-in tree-slide-slide-in-brank-lines))
+ (show-slide-header)
+)
-(defun show-slide-header ()
+(defun set-slide-header (brank-lines)
(save-excursion
(setq tree-slide-footer-overlay
(make-overlay (point-min) (+ 1 (point-min))))
(overlay-put tree-slide-footer-overlay 'after-string " ")
-; (overlay-put tree-slide-footer-overlay
-; 'face '((background-color .
(tree-slide-header-background-color))
-; (foreground-color .
(tree-slide-header-foreground-color)));)
(overlay-put tree-slide-footer-overlay
'face
'((foreground-color . "#696969")
@@ -125,7 +145,26 @@
(concat " [ "
(unless tree-slide-title
(buffer-name))
- " ] (" (format-time-string "%Y-%m-%d") ")\n\n")))
+ " ] (" (format-time-string "%Y-%m-%d") ")"
+ (get-brank-lines brank-lines)))))
+
+
+(defun tree-slide-slide-in (brank-lines)
+ (while (< 2 brank-lines)
+ (set-slide-header brank-lines)
+ (sit-for 0.005)
+ (hide-slide-header)
+ (setq brank-lines (1- brank-lines))))
+
+(defun get-brank-lines (lines)
+ (let ((breaks ""))
+ (while (< 0 lines)
+ (setq lines (1- lines))
+ (setq breaks (concat breaks "\n")))
+ breaks))
+
+(defun show-slide-header ()
+ (set-slide-header 2)
(forward-char 1))
(defun hide-slide-header ()
@@ -185,6 +224,21 @@
global-mode-string
"-%-")))
+;(defun tree-slide-auto-play-start ()
+; (interactive)
+; (setq stop-count 10)
+; (setq count 0)
+; (while (< count stop-count)
+; (tree-slide-move-next-tree)
+; (sleep-for 1)
+; (message "auto play %s" count)
+; (setq count (1+ count))))
+
+;(defun tree-slide-auto-play-stop ()
+; (interactive)
+;)
+
(provide 'org-tree-slide)
;;; org-tree-slide.el ends here
+
- [nongnu] branch elpa/org-tree-slide created (now 3faa042393), ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 82ee351449 001/144: first commit, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 7e0064f6cb 004/144: Add slide-in visual effect,
ELPA Syncer <=
- [nongnu] elpa/org-tree-slide 52d67fc2a0 003/144: Add slide-in visual effect, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 79aec5bbab 006/144: Fix typo, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide d2739053a0 037/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 7daa23cc27 022/144: Support TODO pursuit in a slideshow, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 420342f50b 030/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 8228b14520 031/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide bc6650cbbb 027/144: Rename README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 6dfa0df7f9 002/144: Add start and stop function, display header, and change mode-line, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide bfbd4ddb5d 008/144: Add CONTENT view to see all the subtrees, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 26269ebd8e 016/144: Support TITLE/AUTHOR/EMAIL in a header, ELPA Syncer, 2022/01/18