how can I manage encoder button for a long time pressed? there's a built in function or I must create by myself?
When the button is held down it goes into a HELD state after about 1 second, if the repeat key parameter is set it will start repeating at this point. You can adjust the timing by changing the repeat / hold frequency passed in, see:
https://www.thecoderscorner.com/products/arduino-libraries/io-abstraction/switches-rotary-encoder-documentation/.
there's a way to use encoder outside of Menu function for other purpose
In terms of getting encoder values there are two possibilities:
1. Simplest: in the takeOverDisplay rendering callback, the first parameter is the encoder's current value, the second parameter is the switch state (see enum). You can adjust the range of encoder values by changing the range that it currently represents, again, see the above link
enum RenderPressMode : uint8_t { RPRESS_NONE = 0, RPRESS_PRESSED = 1, RPRESS_HELD = 2 }
2. you register the rotary encoder and switch yourself (see the above link), then pass the values to menuManager when the menu is being displayed. For this see "Controlling the menu items manually" in
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/menumanager-and-iteration/. Be aware that this (option 2) is a pretty advanced use case, and not used that often. There are possible assumptions that switches.getEncoder(0) is the menu encoder. Option 1 requires little on your side and works pretty well for many cases.