pmprichedit.h

来自「基于paragui实现的一个在linux操作系统下使用framebuffer来进」· C头文件 代码 · 共 59 行

H
59
字号
#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 + =
减小字号Ctrl + -
显示快捷键?