forked from bigbluebutton/bigbluebutton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiple pages support for Highligher module
git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@3763 af16638f-c34d-0410-8cfa-b39d5352b314
- Loading branch information
Denis Zgonjanin
committed
Mar 1, 2010
1 parent
a48ca7b
commit 8726194
Showing
8 changed files
with
153 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
bigbluebutton-client/src/org/bigbluebutton/modules/highlighter/events/PageEvent.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.bigbluebutton.modules.highlighter.events | ||
{ | ||
import flash.events.Event; | ||
|
||
import mx.collections.ArrayCollection; | ||
|
||
public class PageEvent extends Event | ||
{ | ||
public static const CHANGE_PAGE:String = "ChangePage"; | ||
|
||
public var pageNum:Number; | ||
public var shapes:ArrayCollection; | ||
|
||
public function PageEvent(type:String) | ||
{ | ||
super(type, true, false); | ||
} | ||
|
||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
bigbluebutton-client/src/org/bigbluebutton/modules/highlighter/managers/PageManager.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package org.bigbluebutton.modules.highlighter.managers | ||
{ | ||
import com.asfusion.mate.events.Dispatcher; | ||
|
||
import mx.collections.ArrayCollection; | ||
import mx.controls.Alert; | ||
|
||
import org.bigbluebutton.modules.highlighter.events.HighlighterUpdate; | ||
import org.bigbluebutton.modules.highlighter.events.PageEvent; | ||
import org.bigbluebutton.modules.present.events.NavigationEvent; | ||
import org.bigbluebutton.modules.present.events.PresentationEvent; | ||
|
||
public class PageManager | ||
{ | ||
private var pageNum:int; | ||
private var numberOfSlides:int; | ||
private var pages:ArrayCollection; | ||
|
||
private var dispatcher:Dispatcher; | ||
|
||
public function PageManager() | ||
{ | ||
pageNum = 0; | ||
pages = new ArrayCollection(); | ||
dispatcher = new Dispatcher(); | ||
} | ||
|
||
public function addShapeToPage(e:HighlighterUpdate):void{ | ||
(pages.getItemAt(pageNum) as ArrayCollection).addItem(e.data); | ||
} | ||
|
||
public function undoShapeFromPage():void{ | ||
(pages.getItemAt(pageNum) as ArrayCollection).removeItemAt(pages.length - 1); | ||
} | ||
|
||
public function clearPage():void{ | ||
var page:ArrayCollection = pages.getItemAt(pageNum) as ArrayCollection; | ||
page = new ArrayCollection(); | ||
} | ||
|
||
public function changePage(e:NavigationEvent):void{ | ||
var event:PageEvent = new PageEvent(PageEvent.CHANGE_PAGE); | ||
event.pageNum = e.pageNumber; | ||
this.pageNum = e.pageNumber; | ||
event.shapes = this.pages.getItemAt(this.pageNum) as ArrayCollection; | ||
dispatcher.dispatchEvent(event); | ||
} | ||
|
||
public function createPages(e:PresentationEvent):void{ | ||
this.numberOfSlides = e.numberOfSlides; | ||
for (var i:int = 0; i<numberOfSlides; i++){ | ||
pages.addItem(new ArrayCollection()); | ||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters