Pastebiniä käytetään pidempien tekstien säilömiseen jotka pitää laittaa talteen tai joita esim. ei voi sanoa irkissä tms kätevästi ilman hirveää floodimista. Lyhykäisiä tunnisteita saa arvaamalla satunnaisesti selville, joten ei kannata pasteta mitään erityisen yksityistä.
Tekstiä mahtuu maksimissaan 64 kilotavua per paste eli älä ihmettele jos tosi pitkät pastet katkeaa, jos taas TOSI isoja pasteja tunkkaa tänne niin tulee jopa virhe eikä paste mene edes läpi. Myäskään viagra- tai cialis-sanoja sisältäviä pasteja ei hyväksytä, sillä erinäiset spämmibotit puskevat niitä vähän väliä.
Pasten nimi (vapaaehtoinen):
Värjäys: ABAPActionScriptActionScript 3AdaANTLRANTLR With ActionScript TargetANTLR With C# TargetANTLR With CPP TargetANTLR With Java TargetANTLR With ObjectiveC TargetANTLR With Perl TargetANTLR With Python TargetANTLR With Ruby TargetApacheConfAppleScriptaspx-csaspx-vbAsymptoteautohotkeyAwkBase MakefileBashBash SessionBatchfileBBCodeBefungeBlitzMaxBooBrainfuckBroCC#C++c-objdumpCFEngine3cfstatementCheetahClojureCMakeCoffeeScriptColdfusion HTMLCommon LispCoqcpp-objdumpCSSCSS+Django/JinjaCSS+Genshi TextCSS+MakoCSS+MyghtyCSS+PHPCSS+RubyCSS+SmartyCythonDd-objdumpDarcs PatchDartDebian Control fileDebian SourcelistDelphiDiffDjango/JinjaDTDDuelDylaneCECLElixirElixir iex sessionEmbedded RagelERBErlangErlang erl sessionEvoqueFactorFancyFantomFelixFortranFSharpGASGenshiGenshi TextGettext CatalogGherkinGLSLGnuplotGoGoodData-CLGosuGosu TemplateGroffGroovyHamlHaskellhaXeHTMLHTML+CheetahHTML+Django/JinjaHTML+EvoqueHTML+GenshiHTML+MakoHTML+MyghtyHTML+PHPHTML+SmartyHTML+VelocityHTTPHybrisINIIoIokeIRC logsJadeJavaJava Server PageJavaScriptJavaScript+CheetahJavaScript+Django/JinjaJavaScript+Genshi TextJavaScript+MakoJavaScript+MyghtyJavaScript+PHPJavaScript+RubyJavaScript+SmartyJSONKotlinLighttpd configuration fileLiterate HaskellLLVMLogtalkLuaMakefileMakoMAQLMasonMatlabMatlab sessionMiniDModelicaModula-2MoinMoin/Trac Wiki markupMOOCodeMoonScriptMuPADMXMLMyghtyMySQLNASMNemerleNewLispNewspeakNginx configuration fileNimrodNumPyobjdumpObjective-CObjective-JOCamlOctaveOocOpaOpenEdge ABLPerlPHPPL/pgSQLPostgreSQL console (psql)PostgreSQL SQL dialectPostScriptPOVRayPowerShellPrologPropertiesProtocol BufferPyPy LogPythonPython 3Python 3.0 TracebackPython console sessionPython TracebackRagelRagel in C HostRagel in CPP HostRagel in D HostRagel in Java HostRagel in Objective C HostRagel in Ruby HostRaw token dataRConsoleREBOLRedcodereStructuredTextRHTMLRubyRuby irb sessionSSassScalaScalate Server PageScamlSchemeScilabSCSSSmalltalkSmartySnobolSQLsqlite3conSquidConfStandard MLsystemverilogTclTcshTeaTeXText onlyUrbiScriptValaVB.netVelocityverilogvhdlVimLXMLXML+CheetahXML+Django/JinjaXML+EvoqueXML+MakoXML+MyghtyXML+PHPXML+RubyXML+SmartyXML+VelocityXQueryXSLTYAML
#include <irrlicht.h> #include <irrTypes.h> #include <iostream> using namespace irr; class GUIFormSpecMenu : public gui::IGUIElement { public: GUIFormSpecMenu(gui::IGUIEnvironment* env, gui::IGUIElement* parent, s32 id, const core::rect<s32> &rect): IGUIElement(gui::EGUIET_ELEMENT, env, parent, id, rect) { m_allow_focus_removal = false; setVisible(true); Environment->setFocus(this); core::rect<s32> listbox_rect(10, 10, 100, 200); gui::IGUIListBox *listbox = Environment->addListBox( listbox_rect, this, -1, true); listbox->addItem(L"Amazing apple pie"); listbox->addItem(L"Bulky banana cream"); listbox->addItem(L"Cool cherry sushi"); listbox->addItem(L"Duftend Durian juice"); listbox->addItem(L"Eloquent edible grass"); listbox->addItem(L"Fried flaspberries"); listbox->addItem(L"Gigantic gross guanotree grease"); listbox->addItem(L"Heavy hot hippopotamus potato"); listbox->addItem(L"Invisible icecream"); listbox->addItem(L"Juicy juicejunk"); listbox->addItem(L"Kleptomanic ketogenic leprechaunberries"); listbox->addItem(L"Literate limonade"); listbox->addItem(L"Minced melon meat"); listbox->addItem(L"Nitty nutty nuts"); listbox->addItem(L"Ordinary oatmeal"); } virtual ~GUIFormSpecMenu() { } void allowFocusRemoval(bool allow) { m_allow_focus_removal = allow; } bool canTakeFocus(gui::IGUIElement *e) { return (e && (e == this || isMyChild(e))) || m_allow_focus_removal; } void draw() { if(!IsVisible) return; video::IVideoDriver* driver = Environment->getVideoDriver(); video::SColor bgcolor(140,0,0,0); driver->draw2DRectangle(bgcolor, AbsoluteRect, &AbsoluteClippingRect); /* Call base class */ gui::IGUIElement::draw(); } virtual bool OnEvent(const SEvent& event) { if(event.EventType==EET_MOUSE_INPUT_EVENT && event.MouseInput.Event != EMIE_MOUSE_MOVED) { // Mouse event other than movement //... } if(event.EventType==EET_GUI_EVENT) { //... if(event.GUIEvent.EventType==gui::EGET_ELEMENT_FOCUS_LOST && isVisible()) { if(!canTakeFocus(event.GUIEvent.Element)) { std::cerr<<"GUIFormSpecMenu: Not allowing focus change." <<std::endl; // Returning true disables focus change return true; } } //... if((event.GUIEvent.EventType==gui::EGET_LISTBOX_SELECTED_AGAIN) || (event.GUIEvent.EventType==gui::EGET_LISTBOX_CHANGED)) { //... return true; } } return Parent ? Parent->OnEvent(event) : false; } private: bool m_allow_focus_removal; }; class MyEventReceiver : public IEventReceiver { public: MyEventReceiver() { // nothing here currently } virtual bool OnEvent(const SEvent& event) { // nothing here currently return false; } }; int main(int argc, char **argv) { video::E_DRIVER_TYPE driverType=video::EDT_OPENGL; // create device MyEventReceiver receiver; IrrlichtDevice *device = createDevice(driverType, core::dimension2d<u32>(512, 384), 16, false, false, false, &receiver); if (device == 0) return 1; // could not create selected driver. device->setWindowCaption(L"Irrlicht Engine - 2D Graphics Demo"); video::IVideoDriver *driver = device->getVideoDriver(); gui::IGUIEnvironment *guienv = device->getGUIEnvironment(); gui::IGUIFont *font = guienv->getBuiltInFont(); gui::IGUISkin *skin = guienv->getSkin(); //skin->setColor(gui::EGDC_BUTTON_TEXT, video::SColor(255,0,0,0)); skin->setColor(gui::EGDC_BUTTON_TEXT, video::SColor(255,255,255,255)); //skin->setColor(gui::EGDC_3D_HIGH_LIGHT, video::SColor(0,0,0,0)); //skin->setColor(gui::EGDC_3D_SHADOW, video::SColor(0,0,0,0)); skin->setColor(gui::EGDC_3D_HIGH_LIGHT, video::SColor(255,0,0,0)); skin->setColor(gui::EGDC_3D_SHADOW, video::SColor(255,0,0,0)); skin->setColor(gui::EGDC_HIGH_LIGHT, video::SColor(255,70,100,50)); skin->setColor(gui::EGDC_HIGH_LIGHT_TEXT, video::SColor(255,255,255,255)); core::rect<s32> formspec_rect(5, 5, 200, 300); GUIFormSpecMenu *formspec = new GUIFormSpecMenu(guienv, guienv->getRootGUIElement(), -1, formspec_rect); while(device->run() && driver) { if (device->isWindowActive()) { u32 time = device->getTimer()->getTime(); driver->beginScene(true, true, video::SColor(255,120,102,136)); guienv->drawAll(); driver->endScene(); } } device->drop(); return 0; }