OmWebPages
IntroductionA class that routes and serves web pages, and manages control values, typically works with OmWebServer for the network interface ClassesMember Functions
addButtonAdd a button on the current page. Calls the action proc with value 1 for press, 0 for release. public addButtonWithLinkAdd a button on the current page, which fires a page redirect after the button-up. The OmWebActionProc would often be NULL here, if the button's main purpose is to go to another web page. public addCheckboxAdd a single checkbox. If checkboxName is NULL, then the first checkbox will be added by addCheckboxX The int value of the control is binary, where the nth checkbox adds 2^(n-1) to the value public addCheckboxXAdd additional checkboxes public addColorAdd a color-input, int value is 0xRRGGBB public addHtmlAdd a block of custom HTML to the page. Your proc is called each time the page is requested. addPageLinkAdd a link on the current page that goes to another page. Also can call an action proc. public addSelectBegin a menu select control. Choices are added with addSelectOption() public addSelectOptionAdd one selectable item, and its integer value if selected public addSlider(const char *, OmWebActionProc, int, int, void *)Add a slider control on the current page. The range is 0 to 100, and calls your param proc when changed. public addSlider(int, int, const char *, OmWebActionProc, int, int, void *)Add a slider control on the current page, with a specific range. public addTimeAdd a time-input public addUrlHandler(const char *, OmUrlHandlerProc, int, void *)Add an arbitrary URL handler. public addUrlHandler(OmUrlHandlerProc, int, void *)Add a wildcard url handler, if no page or specific handler gets it. public allowFooterBy default, any footer proc is used on every page. Disable for current page here. public allowHeaderBy default, any header proc is used on every page. Disable for current page here. public beginPageStart defining a new page. Subsequent calls like addButton() affect this page. public handleRequestExplicitly process a request. (Not typically used.) If you used omWebServer.setHandler(omWebPages), then this is called by the web server on your behalf. In other scenarios you can call it directly with the output buffer and request. The request is the part of the URI after the host name, like "/somepage" or "/info?arg=value". now with streamed variation overloaded on top. public OmWebPagespublic DiscussionNo argument constructor renderHttpResponseHeaderin a OmUrlHandlerProc, set the mimetype (like "text/plain") and response code (200 is OK) public renderPageBeginningin a OmUrlHandlerProc Render the beginning of the page, leaving element open and ready. public renderPageButtonWithin an HtmlProc: Adds a floating link-button to another page. public renderTopMenupublic DiscussionRender a simple menu of all the known pages. It's the default page, too. setBgColorset the background color for next web request, 0xRRGGBB public setBuildDateAndTimesay p.setBuildDateAndTime(__DATE__, __TIME__) so the info web page can display it. public setFooterProcOverride the default footer html public setHeaderProcOverride the default header html public Member DatagreatestRenderLengthpublic DiscussionMaximum size of pages served requestsAllpublic DiscussionTotal number of requests served requestsParampublic DiscussionTotal number of parameter-change requests served |