当前位置: 首页>>代码示例>>PHP>>正文


PHP WebPage::WebPage方法代码示例

本文整理汇总了PHP中WebPage::WebPage方法的典型用法代码示例。如果您正苦于以下问题:PHP WebPage::WebPage方法的具体用法?PHP WebPage::WebPage怎么用?PHP WebPage::WebPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WebPage的用法示例。


在下文中一共展示了WebPage::WebPage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CKEditorTest

 function CKEditorTest()
 {
     parent::WebPage('CKEditor Example');
     //Instantiate first CKEditor
     $editor1 = new CKEditor('', 10, 40);
     //Instantiate second CKEditor
     $editor2 = new CKEditor('Text that is already entered', $editor1->Right + 10, 40, 300);
     //Set the second CKEditor's Skin to Office theme
     //		$editor2->Skin = CKEditor::Office;
     //Instantiate third CKEditor
     $editor3 = new CKEditor('Text that is already entered', $editor2->Right + 50, 40);
     //Set the third CKEditor's Skin to V2 theme
     //		$editor3->Skin = CKEditor::V2;
     //Adds the 3 Editors to the WebPage
     $this->Controls->AddRange($editor1, $editor2, $editor3);
     /*For each of the above 3 editors we're going to add a ComboBox above
     		the editor that allows you to change the theme and a button that will switch
     		the CKEditor to the Basic/Advanced Toolbar*/
     foreach ($this->Controls as $control) {
         if ($control instanceof CKEditor) {
             $this->Controls->Add($skins = new ComboBox($control->Left, 5, 150));
             $skins->Items->AddRange(new Item('-- Select Theme --', null), CKEditor::Kama, CKEditor::Office, CKEditor::V2);
             $skins->Change = new ServerEvent($this, 'ChangeSkin', $skins, $control);
             //Button to switch to Basic Toolbar
             $this->Controls->Add($basic = new Button('Basic', $skins->Right + 15, 5))->Click = new ServerEvent($control, 'SetToolbar', CKEditor::Basic);
             //Button to switch to Advanced Toolbar
             $this->Controls->Add(new Button('Advanced', $basic->Right + 10, 5))->Click = new ServerEvent($control, 'SetToolbar', CKEditor::Full);
             $this->Controls->Add($ta = new TextArea('', $control->Left, $control->Bottom + 10, $control->Width))->Click = new ServerEvent($this, 'ShowText', $control, $ta);
         }
     }
 }
开发者ID:noloh,项目名称:CKEditor,代码行数:31,代码来源:index.php

示例2: TinyMCE

	function __construct()
	{
		parent::WebPage('Basic TinyMCE Example 1');
		$this->Controls->Add($editor = new TinyMCE('Testing'));
		$this->Controls->Add($button = new Button('Click Me', $editor->Right + 10))
			->Click = new ServerEvent($this, 'SomeFunc', $editor);
	}
开发者ID:noloh,项目名称:TinyMCE,代码行数:7,代码来源:Example1.php

示例3: Panel

	function __construct()
	{
		parent::WebPage('StackOverflow 5672167');
		$nav = new Panel(0, 0, 600, 30);
		$chat = new Panel(0, $nav->Bottom, 200, 500);
		$content = new MarkupRegion('', $chat->Right, $chat->Top, 400, 350);
		$rooms = new Panel($content->Left, $content->Bottom, 400, 150);
		$footer = new Panel(0, $chat->Bottom, 600, 50);
		
		$chat->BackColor = Color::LightGreen;
		$content->BackColor = Color::Yellow;
		$rooms->BackColor = Color::Orange;
		$footer->BackColor = Color::Gray;
		
		$this->Controls->AddRange($nav, $chat, $content, $rooms, $footer);
		
		$sections = array('HOME', 'ABOUT', 'CONTACT', 'LOGIN');
			
		foreach($sections as $section)
			$nav->Controls->Add(new Link(null, $section, 0, 5))
				->Click = new ServerEvent($this, 'LoadSection', $content, $section);
				
		$nav->Controls->AllCSSMarginRight = '5px';
		$nav->Controls->AllLayout = Layout::Relative;
		$nav->CSSTextAlign = 'right';
		//Comet (Listener), Bind to Yahoo Flickr API through YQL
		$this->Controls->Add($listener = new Listener(
			'http://query.yahooapis.com/v1/public/yql?q=select%20source%20from%20flickr.photos.sizes%20WHERE%20photo_id%20in%20(select%20id%20from%20flickr.photos.recent)%20and%20label%3D%22Thumbnail%22',
			new ServerEvent($this, 'LoadImage', $chat)));
			
		//Default Section
		$this->LoadSection($content, URL::GetToken('section', 'HOME'));
	}
开发者ID:noloh,项目名称:StackOverflow-Answer--Basic-Site-Example,代码行数:33,代码来源:index.php

示例4: MarkupRegion

	function __construct()
	{
		parent::WebPage('Basic TinyMCE Example 3');
		$content = new MarkupRegion('content.txt', 0, 0, 400, null);
		$this->Controls->AddRange($content, new BlogComment());
		$this->Controls->AllLayout = Layout::Relative;
	}
开发者ID:noloh,项目名称:TinyMCE,代码行数:7,代码来源:Example3.php

示例5: HighlighterTest

 function HighlighterTest()
 {
     parent::WebPage('Syntax Highlighter Example');
     /*Instantiate new SyntaxHighlighter pointing to file code.txt, 
     		using PHP, with  a location of 0, 0, and a Size of null, null*/
     $highlighter = new SyntaxHighlighter('code.txt', SyntaxHighlighter::PHP, 0, 0, null, null);
     //Add SyntaxHighlighter to the WebPage
     $this->Controls->Add($highlighter);
 }
开发者ID:noloh,项目名称:SyntaxHighlighter,代码行数:9,代码来源:index.php

示例6: ClickCounter

 /**
  * Constructor
  */
 function ClickCounter()
 {
     parent::WebPage('Classic Click Counter');
     //Instantiate Button with left and top of 100
     $button = new Button('Click Me', 100, 100, null, null);
     //Set Click Event of $button. Triggers CountClick with $button as param
     $button->Click = new ServerEvent($this, 'CountClick', $button);
     //Adds the button to show
     $this->Controls->Add($button);
 }
开发者ID:noloh,项目名称:ClickCounter,代码行数:13,代码来源:index.php

示例7: Events

 function Events()
 {
     /* Calls the WebPage's constructor. This must be done to
        ensure that WebPage is properly instantiated. The 
        parameter specifies a string to be displayed in the
        browser's title bar. */
     parent::WebPage('Demonstrating basic Events');
     // Calls the CreateButton function, which is defined below
     $this->CreateButton();
 }
开发者ID:noloh,项目名称:Basic-Events,代码行数:10,代码来源:Events.php

示例8: array

 function EmailExample3()
 {
     parent::WebPage('EmailHelper Example 3');
     //Basic Example
     EmailHelper::Email('john@abc.com', 'gary@abc.com', 'EmailHelper Basic', 'Some Test Message');
     //Message
     //Advanced Example
     EmailHelper::Email(array('mary@xyz.com', 'sarah@abc.com'), array('jake@abc.com', 'joe@xyz.com', 'max@abc.com'), 'EmailHelper Advanced', array('Some Message', '<b>Some Message</b>'));
     //RichMessage
 }
开发者ID:noloh,项目名称:EmailHelper,代码行数:10,代码来源:EmailExample3.php

示例9: FullCalendar

 function __construct()
 {
     parent::WebPage('FullCalendar Example 1');
     $this->Controls->Add($calendar = new FullCalendar(array(FullCalendar::Month, FullCalendar::AgendaDay), 100, 100));
     // Create Button to Add Events
     $this->Controls->Add(new Button('Add'))->Click = new ServerEvent($this, 'AddEventFunc', $calendar);
     // Setting Events on the Calendar
     $calendar->DayClick = new ServerEvent($this, "DayFunc");
     $calendar->EventClick = new ServerEvent($this, "EventFunc");
 }
开发者ID:noloh,项目名称:FullCalendar,代码行数:10,代码来源:Example1.php

示例10: NavHandlerTest

 function NavHandlerTest()
 {
     parent::WebPage('Welcome to NavHandler Test');
     $this->BackColor = '#999999';
     /*Group for groupable items, used in this example as the
       navigation triggers*/
     $group = new Group();
     //RolloverLabels to be used as navigation elements
     $rollover1 = new RolloverLabel('red');
     $rollover2 = new RolloverLabel('green');
     $rollover3 = new RolloverLabel('blue');
     //Set Layout to Relative for our Rollovers for lazy alignment
     $rollover1->Layout = $rollover2->Layout = $rollover3->Layout = Layout::Relative;
     //Add RolloverLabels to our group
     $group->AddRange($rollover1, $rollover2, $rollover3);
     /*Our content panel which will be used to display the various
       sections triggered by the navigation elements and NavHandler*/
     $contentPanel = new Panel(10, 100, 500, 500);
     $contentPanel->Border = 1;
     /* Our NavHandler object, note that this must be stored
      * in a variable of some object to ensure it does not get
      * cleaned up by garbage collection
      * 
      * The first parameter of the constructor takes in a ContentPanel
      * where your sections will display.
      * 
      * The second parameter takes in an event which will be called to
      * create a section.
      * 
      * The optional third parameter "group" takes in a Group object to be used in conjuction
      * with the NavHandlers token for BookmarkFriendly.
      * 
      * The optional fourth parameter, not listed in the line below
      * allows for a token name, the default is 'section' to be used to
      * generate a url token in conjuction with bookmark friendly. If set
      * to false, then the NavHandler will not create tokens or be bookmarkable. 
      * */
     $this->Nav1 = new NavHandler($contentPanel, new ServerEvent($this, 'CreateSection'), $group);
     /*We now set the Select of each of our RolloverLabels to trigger the NavHandler
       LaunchSection function. LaunchSection takes in the section as the first parameter
       and also has an optional second parameter reCreate, not used here which will always
       call your NavHandler function even if the previous object associated with that section
       is already in use. Also note that if a group is passed in the SelectedValue of
       the group will be used.*/
     $rollover1->Select = new ServerEvent($this->Nav1, 'LaunchSection', 'red');
     $rollover2->Select = new ServerEvent($this->Nav1, 'LaunchSection', 'green');
     $rollover3->Select = new ServerEvent($this->Nav1, 'LaunchSection', 'blue');
     /*Alternative use of NavHandler, using our group. Since the section would now correspond
       to the SelectedValue of the Group.*/
     //$group->Change = new ServerEvent($this->Nav1, 'LaunchSection', $group);
     //Add the group, and contentPanel to the Controls of the WebPage
     $this->Controls->AddRange($group, $contentPanel);
 }
开发者ID:noloh,项目名称:NavHandler,代码行数:53,代码来源:index.php

示例11: EmailHelper

 function EmailExample2()
 {
     parent::WebPage('EmailHelper Example 2');
     //Basic Example
     $emailHelper1 = new EmailHelper('john@abc.com', 'gary@abc.com', 'EmailHelper Basic', 'Some Test Message');
     //Message
     $emailHelper1->Send();
     //Advanced Example
     $emailHelper2 = new EmailHelper(array('john@xyz.com', 'mary@abc.com'), array('jake@abc.com', 'sim@abc.com', 'joe@xyz.com'), 'EmailHelper Advanced', array('Some Message', '<b>Some Message</b>'));
     //RichMessage
     //From
     $emailHelper2->Send();
 }
开发者ID:noloh,项目名称:EmailHelper,代码行数:13,代码来源:EmailExample2.php

示例12: Index

 function Index()
 {
     parent::WebPage('The Classic Game of HangMan -- programmed in NOLOH');
     /*Add NOLOH logo and text label here so they are persistent throughout
     		the application*/
     $this->Controls->Add(new Image('Images/NOLOHLogo.gif', 15, 15));
     $this->Controls->Add($title = new Label('HangMan', 17, 60, 200, 50));
     /* Sets the font via the CSS_ syntactical sugar. Any property available 
     		in CSS can be set on a NOLOH Control by prepending it with CSS.*/
     $title->CSSFont = '30px verdana';
     //Instantiate and Add a new instance of Hangman
     $this->Controls->Add(new HangMan(0, 80, 850, 750));
 }
开发者ID:noloh,项目名称:HangMan,代码行数:13,代码来源:index.php

示例13: Label

	function __construct()
	{
		/* Calls the WebPage's constructor. This is done to ensure
		   the WebPage is properly instantiated. The paramater
		   specifies a string to be displayed in the title bar */
		parent::WebPage('Hello World in NOLOH');
		/* Creates an instance of NOLOH's Label object, giving it
		   the Text 'Hello World' and Left and Top coordinates
		   of 100 pixels. The Label object is stored to a local
		   variable named $label. */
		$label = new Label('Hello World', 100, 100);
		/* Adds the Label object to the WebPage's Controls ArrayList.
		   Without this line, a Label is merely created, but will
		   not be displayed. */
		$this->Controls->Add($label);
	}
开发者ID:noloh,项目名称:Hello-World,代码行数:16,代码来源:index.php

示例14: BadgeTest

 function BadgeTest()
 {
     parent::WebPage('Welcome to BadgeTest');
     /* The default behavior of NOLOHBadge is to display
      * an image next to the NOLOH version number.*/
     $badge1 = new NOLOHBadge(100, 100);
     /* However, you can decide to display a text-only version
      * by passing in true to the textOnly parameter.
      * an image next to the NOLOH version number.*/
     $badge2 = new NOLOHBadge(100, 200, true);
     /* Futhermore, you can decide to turn off the version
      * number by passing in false to the showVersion parameter*/
     $badge3 = new NOLOHBadge(100, 300, true, false);
     /* Futhermore, you can decide to turn off the version
      * number while keeping the image*/
     $badge4 = new NOLOHBadge(100, 400, false, false);
     $this->Controls->AddRange($badge1, $badge2, $badge3, $badge4);
 }
开发者ID:noloh,项目名称:NOLOHBadge,代码行数:18,代码来源:index.php

示例15: ContentSliderExample

	function ContentSliderExample()
	{
		parent::WebPage('ContentSlider Example 1');
		//Define Images 1
	/*	$images = array(
			'Images/1.jpg',
			'Images/2.jpg',
			'Images/3.jpg');*/
		//Define Images 2
		$images = array(
			array('Path' => 'Images/1.jpg', 'URL'  => 'http://www.noloh.com'),
			array('Path' => 'Images/2.jpg', 'URL'  => 'http://www.google.com'),
			array('Path' => 'Images/3.jpg', 'URL'  => 'http://www.facebook.com'));
		//Randomize
		shuffle($images);
		//Create ContentSlider
		$contentSlider = new ContentSlider($images, 0, 0, 300, 200);
		$this->Controls->Add($contentSlider);
	}
开发者ID:noloh,项目名称:ContentSlider,代码行数:19,代码来源:index.php


注:本文中的WebPage::WebPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。