📄 pmprichedit.h
字号:
#include "pgrichedit.h"#include "pgnavigator.h"class PmpRichEdit : public PG_RichEdit, public PG_Navigator {public: void Scroll(int x, int y); PmpRichEdit(PG_Widget* parent, const PG_Rect& r = PG_Rect::null, bool autoVerticalResize = false, Uint32 linewidth = 0, Uint32 tabSize = 30, Uint32 childsborderwidth = 8, const char* style="WidgetList"); ~PmpRichEdit(); // bool eventKeyDown(const SDL_KeyboardEvent* key); void Up(); void Down();};PmpRichEdit::PmpRichEdit(PG_Widget* parent, const PG_Rect& r , bool autoVerticalResize , Uint32 linewidth , Uint32 tabSize , Uint32 childsborderwidth , const char* style) : PG_RichEdit( parent, r , autoVerticalResize , linewidth , tabSize , childsborderwidth , style){}PmpRichEdit::~PmpRichEdit(){}void PmpRichEdit::Scroll(int x, int y){ ScrollTo(x,y); my_objVerticalScrollbar->SetPosition(y);}void PmpRichEdit::Up(){ if(this->GetScrollPosY() < 25) { this->Scroll(0,0); } else this->Scroll(0,this->GetScrollPosY()-25);}void PmpRichEdit::Down(){ this->Scroll(0,this->GetScrollPosY()+25);}/*bool PmpRichEdit::eventKeyDown(const SDL_KeyboardEvent *key) { switch(key->keysym.sym) { case SDLK_UP: if(this->GetScrollPosY() < 25) { this->Scroll(0,0); } else this->Scroll(0,this->GetScrollPosY()-25); return true; break; case SDLK_DOWN: this->Scroll(0,this->GetScrollPosY()+25); return true; break; } return false;}*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -