SOXTMATERIALLIST(3iv)

✨ SoXtMaterialList(3IV) ✨

okay bestie, gather round, because today we're talking about SoXtMaterialList from the SoXt corner of Inventor β€” it's the manual page, it's SoXtMaterialList(3IV), and it is genuinely so much fun, no cap πŸ’…

🌸 INHERITS FROM

SoXtComponent > SoXtMaterialList

like, it's a whole SoXtComponent at heart, it just woke up and chose materials ✨


πŸŽ€ SYNOPSIS

#include <Inventor/Xt/SoXtMaterialList.h>

typedef void        SoXtMaterialListCB(void *userData, const SoMaterial *mtl)

πŸ¦‹ Methods from class SoXtMaterialList:

                    SoXtMaterialList(Widget parent = NULL, const char
                         *name = NULL, SbBool buildInsideParent = TRUE,
                         const char *dir = NULL)
                    ~SoXtMaterialList()
                    addCallback(SoXtMaterialListCB *f, void *userData =
                         NULL)
                    removeCallback(SoXtMaterialListCB *f, void *userData =
                         NULL)

πŸ’– Methods from class SoXtComponent:

virtual void            show()
virtual void            hide()
SbBool                  isVisible()
Widget                  getWidget() const
SbBool                  isTopLevelShell() const
Widget                  getShellWidget() const
Widget                  getParentWidget() const
void                    setSize(const SbVec2s &size)
SbVec2s                 getSize()
Display *               getDisplay()
void                    setTitle(const char *newTitle)
const char *            getTitle() const
void                    setIconTitle(const char *newIconTitle)
const char *            getIconTitle() const
void                    setWindowCloseCallback(SoXtComponentCB *func, void
                             *data = NULL)
static SoXtComponent *  getComponent(Widget w)
const char *            getWidgetName() const
const char *            getClassName() const

πŸ‘‘ DESCRIPTION

so the whole point of this class is that you get to pick an SoMaterial from palettes of predefined materials. like β€” gold, silver, or bronze from the metal palette πŸ₯‡πŸ₯ˆπŸ₯‰; emerald, pearl, or ruby from the stones palette πŸ’ŽπŸ¦ͺ❀️. iconic selection, honestly.

and then the chosen material gets passed straight to the callback functions you registered with this component. that's it, that's the whole vibe. the way that it just hands you the material you asked for?? obsessed.


πŸ’… METHODS

  • SoXtMaterialList(Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE, const char *dir = NULL)
  • ~SoXtMaterialList()

okay so the constructor takes a directory name, and that directory is the home directory for the material palettes. you can have literally any number of palettes chilling in there. a palette is a subdirectory that contains Inventor data files, and each file describes one material. and if you want the predefined Inventor materials that already exist? those live in /usr/share/data/materials 🫢

  • addCallback(SoXtMaterialListCB *f, void *userData = NULL)
  • removeCallback(SoXtMaterialListCB *f, void *userData = NULL)

register functions that get called whenever the user picks a new material from the list ✨ every time one of these callbacks fires, it gets handed the userData pointer plus a pointer to the newly selected material. so you always know exactly which material the user just fell in love with πŸ’–


🌈 SEE ALSO

SoXtComponent, SoCallbackList, SoMaterial, SoXtMaterialEditor


and that's the page, bestie!! this is SoXtMaterialList(3IV) β€” yes the same name at the top and the bottom, the man page said so, I don't make the rules πŸ’€ β€” straight from the SoXtMaterialList(3IV)() source/version line with its date, so you know it's the real one. slay, go edit some materials, periodt πŸŽ€βœ¨